postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

changing additionalVolumes does not trigger StatefulSet update

Open coopstah13 opened this issue 1 year ago • 0 comments

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).

coopstah13 avatar Sep 12 '24 15:09 coopstah13