zalando / zalando/postgres-operator
[feature request] add possibility to ignore differences in pod image in sync process
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? registry.opensource.zalan.do/acid/postgres-operator:v1.11.0
- Where do you run it - cloud or metal? Kubernetes or OpenShift? AWS EKS
- Are you running Postgres Operator in production? yes
- Type of issue? Bug report/feature request
We are experiencing the same issue as #1397, #2453 and #1955 and I'd like to propose a fix for it.
For us it is company policy to have every docker image we use mirrored in our own private registry, which we do by running a k8s mutating webhook that pulls the docker images, pushes it to our own registry and then swaps out the image reference on pod creation.
Therefore our pods always have a different image set than the StatefulSet, so postgres-operator will kill and recreate all of our clusters every sync interval.
I'd like to propose a new configuration option ignoreImageDifference, which by default should be false to keep the current behavior. If it's set to true, differences in the actual image in the pod vs in the statefulset will be ignored by the sync processor.
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
The payload identifies the sync processor as the entry point; trace its comparison between pod and StatefulSet images and locate the existing configuration path. Verify that the default preserves current reconciliation behavior and that enabling ignoreImageDifference prevents recreation for image-only differences, while other differences still sync.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100