zalando / zalando/postgres-operator

Pooler rollout update on 2 nodes is impossible with hard pod anti-affinity

Open
#2,843 0 comments 3 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.