Skip to content
Snippets Groups Projects
Commit 1ed373a0 authored by Edward Hicks's avatar Edward Hicks :8ball:
Browse files

convert everything to use the service ip instead of the local one since

it'll probably be more reliable than the pod's direct ip
parent 1cd57481
No related branches found
No related tags found
No related merge requests found
......@@ -3,5 +3,8 @@ protected-mode no
dir /data
maxclients 2048
timeout 86400
requirepass "[[PASSWORD]]"
masterauth "[[PASSWORD]]"
slave-announce-ip osuredis-[[APPNAME]]-[[NODEID]].[[NAMESPACE]].svc.cluster.local
port 26379
protected-mode no
dir /data
slave-announce-ip osuredis-[[APPNAME]]-[[NODEID]].[[NAMESPACE]].svc.cluster.local
sentinel monitor [[APPNAME]] osuredis-[[APPNAME]]-0.[[NAMESPACE]].svc.cluster.local 6379 2
sentinel down-after-milliseconds [[APPNAME]] 5000
......
......@@ -45,10 +45,10 @@ spec:
command:
- "sh"
- "-c"
- "cp /templates/redis.template.conf /data/redis.conf;
cp /templates/sentinel.template.conf /data/sentinel.conf;
- "NODEID=$(echo -n $HOSTNAME | sed 's/.*\\-\\([0-9]\\+\\)$/\\1/g');
cat /templates/redis.template.conf | sed \"s/\[\[NODEID\]\]/${NODEID}/g\" >/data/redis.conf;
cat /templates/sentinel.template.conf | sed \"s/\[\[NODEID\]\]/${NODEID}/g\" >/data/sentinel.conf;
echo '' >>/data/redis.conf;
NODEID=$(echo -n $HOSTNAME | sed 's/.*\\-\\([0-9]\\+\\)$/\\1/g');
if [ \"$NODEID\" != '0' ]; then
echo 'slaveof osuredis-{{.Values.appName}}-0.{{.Release.Namespace}}.svc.cluster.local 6379' >>/data/redis.conf;
fi"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment