Skip to content

Commit

Permalink
fix sentinel timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathsreekanth committed Jun 4, 2024
1 parent 94b569f commit 8717b2a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ spec:
done
loop=$(echo $nodes | sed -e "s/"*"/\n/g")
foundMaster=$false
foundMaster=false
while [ $foundMaster == $false ]
while [ "$foundMaster" == "false" ]
do
for i in $loop
do
Expand All @@ -705,27 +705,27 @@ spec:
if [ "$ROLE" = "master" ]; then
MASTER=$i.authorization.svc.cluster.local
echo "Master found at $MASTER..."
foundMaster=$true
foundMaster=true
break
else
MASTER=$(redis-cli --no-auth-warning --raw -h $i -a $REDIS_PASSWORD info replication | awk '{print $1}' | grep master_host: | cut -d ":" -f2)
if [ "$MASTER" = "" ]; then
echo "Master not found..."
echo "Sleeping 5 seconds for redis pods to come up..."
echo "Waiting 5 seconds for redis pods to come up..."
sleep 5
MASTER=
else
echo "Master found at $MASTER..."
foundMaster=$true
foundMaster=true
break
fi
fi
done
if [ $foundMaster == $true ]; then
if [ "$foundMaster" == "true" ]; then
break
else
echo "Master not found, sleep for 30s before attempting again"
echo "Master not found, wait for 30s before attempting again"
sleep 30
fi
done
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/testdata/cr_auth_proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
redis: redis:6.0.8-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/testdata/cr_auth_proxy_bad_vault_cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
redis: redis:6.0.8-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/testdata/cr_auth_proxy_bad_vault_key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
redis: redis:6.0.8-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/testdata/cr_auth_proxy_no_redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
redis: redis:7.2.4-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/testdata/cr_auth_proxy_openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
redis: redis:6.0.8-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/testdata/cr_auth_proxy_vault_cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
redis: redis:6.0.8-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ spec:
redis: redis:7.2.4-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
redis: redis:7.2.4-alpine
commander: rediscommander/redis-commander:latest
redisName: redis-csm
redisCommander: redicommander
redisCommander: rediscommander
sentinel: sentinel
redisReplicas: 5
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
Expand Down

0 comments on commit 8717b2a

Please sign in to comment.