diff --git a/operator/redisfailover/service/generator.go b/operator/redisfailover/service/generator.go index c735a74d4..1f5279990 100644 --- a/operator/redisfailover/service/generator.go +++ b/operator/redisfailover/service/generator.go @@ -196,8 +196,8 @@ func generateRedisReadinessConfigMap(rf *redisfailoverv1.RedisFailover, labels m } check_slave(){ - in_sync=$(redis-cli -a "${REDIS_PASSWORD}" info replication | grep $IN_SYNC | tr -d "\r" | tr -d "\n") - no_master=$(redis-cli -a "${REDIS_PASSWORD}" info replication | grep $NO_MASTER | tr -d "\r" | tr -d "\n") + in_sync=$(redis-cli --no-auth-warning -a "${REDIS_PASSWORD}" info replication | grep $IN_SYNC | tr -d "\r" | tr -d "\n") + no_master=$(redis-cli --no-auth-warning -a "${REDIS_PASSWORD}" info replication | grep $NO_MASTER | tr -d "\r" | tr -d "\n") if [ -z "$in_sync" ] && [ -z "$no_master" ]; then exit 0 @@ -206,7 +206,7 @@ func generateRedisReadinessConfigMap(rf *redisfailoverv1.RedisFailover, labels m exit 1 } - role=$(redis-cli -a "${REDIS_PASSWORD}" info replication | grep $ROLE | tr -d "\r" | tr -d "\n") + role=$(redis-cli --no-auth-warning -a "${REDIS_PASSWORD}" info replication | grep $ROLE | tr -d "\r" | tr -d "\n") case $role in $ROLE_MASTER)