You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to modify the spec.sentinel.serviceAnnotations field to add annotations to the service/rfs-redisfailover resource. When adding the key: value under spec.sentinel.serviceAnnotations, I was expecting to see the key: value annotation shows up in the service/rfs-redisfailover resource.
Actual behaviour
But I found that adding key value pairs under this field has no effect.
The field spec.sentinel.serviceAnnotations only has effect if it was specified when creating the cluster.
Steps to reproduce the behaviour
Deploy the redis-operator
Deploy a simple redis cluster using the following yaml file
Kubernetes configuration used (eg: Is RBAC active?) yes
Logs
I didn't find any related lines regarding this bug in the operator log. The log is attached as a file below operator.log
Possible root cause and fix
We suspect this behavior is caused by only creating but not updating the service resource. As shown at this line in the code, the service resource is only created if not exist, but never updated:
Potential fix is to change the CreateIfNotExistsService to CreateOrUpdateService so that the service resource is also updated. We are happy to provide a patch for this.
The text was updated successfully, but these errors were encountered:
Expected behaviour
I was trying to modify the
spec.sentinel.serviceAnnotations
field to add annotations to theservice/rfs-redisfailover
resource. When adding thekey: value
underspec.sentinel.serviceAnnotations
, I was expecting to see thekey: value
annotation shows up in theservice/rfs-redisfailover
resource.Actual behaviour
But I found that adding key value pairs under this field has no effect.
The field
spec.sentinel.serviceAnnotations
only has effect if it was specified when creating the cluster.Steps to reproduce the behaviour
spec.sentinel.serviceAnnotations
by applying the following yaml file:Observe that nothing changed in the
service/rfs-redisfailover
resource - thekey: value
annotation does not show up.`kubectl get service/rfs-redisfailover -o yaml`
Environment
How are the pieces configured?
quay.io/spotahome/redis-operator:v1.1.0
Logs
I didn't find any related lines regarding this bug in the operator log. The log is attached as a file below
operator.log
Possible root cause and fix
We suspect this behavior is caused by only creating but not updating the service resource. As shown at this line in the code, the service resource is only created if not exist, but never updated:
redis-operator/operator/redisfailover/service/client.go
Line 52 in 6e08a31
Potential fix is to change the
CreateIfNotExistsService
toCreateOrUpdateService
so that the service resource is also updated. We are happy to provide a patch for this.The text was updated successfully, but these errors were encountered: