redis-operator
redis-operator copied to clipboard
readinessProbe and livenessProbe fail when AUTH is enforced
Expected behaviour
Enable AUTH for Redis and Sentinel via :
spec:
auth:
secretPath: k8s-secret-name
Actual behaviour
Issue 1
AUTH is configured on rfr
pods, but the livenessProbe
fails because it's not attempting to authenticate:
livenessProbe:
exec:
command:
- sh
- -c
- redis-cli -h $(hostname) ping
The readinessProbe
doesn't have this issue, as it execute a script from a ConfigMap and the use of -a $REDIS_PASSWORD}
in #235 . It'd be nice to have a way to modify these probes, similar to how you can modify the shutdown
script.
Issue 2
AUTH is not configured on rfs
pods, and has similar challenges with readinessProbe
and livenessProbe
not attempting to authenticate:
livenessProbe:
exec:
command:
- sh
- -c
- redis-cli -h $(hostname) -p 26379 ping
readinessProbe:
exec:
command:
- sh
- -c
- redis-cli -h $(hostname) -p 26379 ping
It'd be nice to have a way to modify these probes, similar to how you can modify the shutdown
script.
Steps to reproduce the behaviour
- Redis docker image which enforces
protected-mode yes
- Create a k8s Secret with a
password
field to use as the password for AUTH - Enable auth in the RedisFailover CRD
Environment
- Redis Operator version = 1.1.1
- Kubernetes version = 1.21
- Kubernetes configuration used (eg: Is RBAC active?)
Logs
The Operator is running fine, it's just that it never configures AUTH on the probes for Redis and Sentinel, so k8s will continually think the Pods are not available.
This issue is stale because it has been open for 45 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
@szelenka check if https://github.com/spotahome/redis-operator/pull/430 fixes the issue now?