[redis-ha] Master pod set announce IP (#12157)

* [redis-ha] Fixing issue with announce ip on master

Signed-off-by: Matt Martyn <MMartyn@users.noreply.github.com>

* [redis-ha] Fixing issue with announce ip on master - version bump

Signed-off-by: Matt Martyn <MMartyn@users.noreply.github.com>
This commit is contained in:
Matt Martyn
2019-03-13 18:44:47 -07:00
committed by Kubernetes Prow Robot
parent 3d337d8ddb
commit 809c352ad1
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ keywords:
- redis
- keyvalue
- database
version: 3.3.0
version: 3.3.1
appVersion: 5.0.3
description: Highly available Kubernetes implementation of Redis
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
@@ -74,8 +74,9 @@ data:
echo "Setting up defaults"
if [ "$INDEX" = "0" ]; then
echo "Setting this pod as the default master"
sed -i "s/^.*slaveof.*//" "$REDIS_CONF"
redis_update "$ANNOUNCE_IP"
sentinel_update "$ANNOUNCE_IP"
sed -i "s/^.*slaveof.*//" "$REDIS_CONF"
else
DEFAULT_MASTER="$(getent hosts "$SERVICE-announce-0" | awk '{ print $1 }')"
if [ -z "$DEFAULT_MASTER" ]; then