zalando / zalando/postgres-operator
changing additionalVolumes does not trigger StatefulSet update
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the additionalVolumes comparison used when deciding whether to update the StatefulSet, focusing on the volumeSource secretName as well as volume count and mounts. Reproduce the change from minio-ca-cert to minio-ca-cert-2, then verify that the resulting StatefulSet update is detected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100