postgres-operator
postgres-operator copied to clipboard
changing additionalVolumes does not trigger StatefulSet update
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using? 1.12.2
- Where do you run it - cloud or metal? Kubernetes or OpenShift? EKS, GKE, k3s
- Are you running Postgres Operator in production? yes
- Type of issue? Bug report
The fix performed for #1458 is incomplete. There is only a check for a difference of number of volumes, but not if the volumes themselves change.
For example, if you have
additionalVolumes:
- mountPath: /certs/minio
name: minio-ca-cert
targetContainers: []
volumeSource:
secret:
secretName: minio-ca-cert
and you change it to (note the change to the secretName)
additionalVolumes:
- mountPath: /certs/minio
name: minio-ca-cert
targetContainers: []
volumeSource:
secret:
secretName: minio-ca-cert-2
The operator does not pick up this change, because the volume count stays the same, and it only checks for differences in the volume mounts (which are the same in this case).