zalando / zalando/postgres-operator
PG based on Advanced StatefulSet
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
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 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