An incomplete cr.spec.kubernetesConfig.redisSecret
causes nil-pointer dereference inside operator
#286
Labels
bug
Something isn't working
What version of redis operator are you using?
redis-operator version: We are using redis-operator built from the
HEAD
and built from the latest releaseDoes this issue reproduce with the latest release?
Yes, the problem reproduces with
quay.io/opstree/redis-operator:v0.10.0
What operating system and processor architecture are you using (
kubectl version
)?kubectl version
OutputWhat did you do?
To reproduce, apply the below cr file
cr_cluster.yaml
Observe that the operator crashes and restarts. Below is the operator crash log:
kubectl logs deployment.apps/redis-operator -n redis-operator
outputWhat did you expect to see?
Redis-operator does not crash and (perhaps) rejecting the cr input.
What did you see instead?
Redis-operator crashed with the forementioned cr yaml file
Possible root cause
Neither
key
norname
are required under the fieldcr.spec.kubernetesConfig.redisSecret
according to the CRD #L155-L163 inside the operator repo.The operator crashes due to a nil-pointer reference when only one of the two fields:
key
andname
is specified. The nil pointer reference is atredis-operator/k8sutils/statefulset.go
Lines 412 to 414 in f1c547e
The text was updated successfully, but these errors were encountered: