Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sentinel timeout #586

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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..."
bharathsreekanth marked this conversation as resolved.
Show resolved Hide resolved
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"
bharathsreekanth marked this conversation as resolved.
Show resolved Hide resolved
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
Loading