Skip to content

Instantly share code, notes, and snippets.

@jithin-scaria
Created August 12, 2022 03:39
Show Gist options
  • Save jithin-scaria/05ae8bdb1fd547cd9668f396b814f09a to your computer and use it in GitHub Desktop.
Save jithin-scaria/05ae8bdb1fd547cd9668f396b814f09a to your computer and use it in GitHub Desktop.
"initContainers" command and args
...
command: [ "sh", "-c" ]
args:
- |
if [ -f "/conf/redis.conf" ]; then
echo "config exists /conf/redis.conf .. not creating new"
if [ -f "/tmp/startup/redis-startup.sh" ];then
cp /tmp/startup/redis-startup.sh /conf/redis-startup.sh
fi
else
echo "config doesn't exist copying to /conf/redis.conf"
cp /tmp/conf/redis.conf /conf/redis.conf
fi
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment