zalando / zalando/postgres-operator

PG based on Advanced StatefulSet

Open
#1,908 0 comments 0 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

Enhancement request:
Can you consider optionally build PG statefulset based on OpenCruise?
https://openkruise.io/docs/user-manuals/advancedstatefulset/

Lets have the PG cluster
postgres-operator-6967dcf6c4-bcqjb 1/1 Running 2 38d
rob-dev-0 1/1 Running 5 38d
rob-dev-1 1/1 Running 3 38d
rob-dev-2 1/1 Running 2 38d
rob-dev-pooler-6767cc7474-pkxgn 1/1 Running 2 38d
rob-dev-pooler-6767cc7474-wkmpq 1/1 Running 2 36d
rob-dev-pooler-repl-7bfd87cd54-49bzr 1/1 Running 2 38d
rob-dev-pooler-repl-7bfd87cd54-mc9ld 1/1 Running 2 38d

{
"replica": [
"rob-dev-0"
],
"sync_standby": [
"rob-dev-1"
],
"leader": [
"rob-dev-2"
]
}

Now, we can have issue with PV used by replica rob-dev-0
From the Patroni point of view I can delete async replica and build a new one
using another PV.
But, because it's a Kubernetes statefuset, I can only delete rob-dev-2 or
rob-dev-2 and rob-dev-1. It's impossible to delete pod rob-dev-0
Using advanced statefulset, I can delete rob-dev-0 and build a new replica
rob-dev-4, for example
Regards, Hudec

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

The issue names no repository files or tests. Start by reading the OpenKruise AdvancedStatefulSet documentation and reviewing how the operator handles Kubernetes StatefulSets and Patroni replicas. Done means an optional configuration supports AdvancedStatefulSets and safely replaces the specified replica, with tests covering the behavior.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.