zalando / zalando/postgres-operator

Postgres Instance level pod anti-affinity

Open
#2,886 1 comment 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

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.13.0
  • https://github.com/zalando/postgres-operator/issues
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
  • Bare metal K8s
  • Are you running Postgres Operator in production? [yes | no]
  • Yes
  • Type of issue? [Bug report, question, feature request, etc.]
  • feature request

Summary:

Currently, the Postgres Operator allows setting pod anti-affinity rules at the cluster level, either as preferred or required. However, in large Kubernetes clusters with multiple PostgreSQL clusters running in separate node groups, a more granular level control is needed

Use Case
In our setup, we have a large Kubernetes cluster hosting multiple PostgreSQL clusters, each running on dedicated node groups. The existing cluster-wide anti-affinity setting does not provide the flexibility to define anti-affinity at an individual PostgreSQL instance level.

I'm interested in contributing this feature request to the Postgres Operator if it is beneficial to the broader community. If others needs this change or have feedback on this approach, love to collaborate and refine the solution further.

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 reviewing how the operator currently configures cluster-level pod anti-affinity and the relevant Kubernetes scheduling behavior. The issue does not name files, tests, or an exact configuration shape; completion would require an agreed design for per-instance anti-affinity and corresponding implementation and validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.