zalando / zalando/postgres-operator
Pooler rollout update on 2 nodes is impossible with hard pod anti-affinity
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
- Which image of the operator are you using? ghcr.io/zalando/postgres-operator:v1.13.0
- Where do you run it - cloud or metal? Kubernetes or OpenShift? AWS EKS K8s
- Are you running Postgres Operator in production? yes
- Type of issue? feature request
I have 2 Kubernetes nodes for Postgres clusters (each cluster consists of 2 Postgres instances) and I need hard pod anti-affinity so the pods of the same Postgres cluster are always on different nodes.
But there is an issue that same pod anti-affinity and node-affinity settings apply to pooler pods.
So when starting update of pooler deployment, new pods just go into Pending state, because it have pooler pods on all nodes already.
I think it would be great to have a way to resolve it, at least possibility to specify different pod anti-affinity and node-affinity rules for pooler and Postgres pods.
Or maybe possibility to specify pooler deployment strategy to set maxSkew: 0 or type: Recreate.
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
Start by examining how the pooler deployment receives pod anti-affinity, node-affinity, and deployment strategy settings during an update. Reproduce the two-node rollout where new pooler pods remain Pending, then define and verify a configuration that lets pooler scheduling differ from Postgres pods or safely uses the requested rollout strategy.
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
- 38/100