zalando / zalando/postgres-operator
no option to use an existing priorityClassName for posgres Pods or make podPriorityClassName value configurable
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?: registry.opensource.zalan.do/acid/postgres-operator:v1.10.1
- Where do you run it: cloud (AWS, Azure)
- Are you running Postgres Operator in production?: yes
- Type of issue?: [Bug report]
In the current implementation there is no option to specify an existing priorityClassName for Postgres Cluster pods. The actual value for priorityClassName is set only for postgres-operator deployment.
In contrast, podPriorityClassName parameter designed for PostgreSQL cluster disrespects existing priority classes in a cluster and creates a new priority class with a static priority value. This makes using the podPriorityClassName parameter unusable in production clusters where priority classes are created and managed externally. If an existing priority class is specified under podPriorityClassName (podPriorityClassName:critical in the example below), Helm Chart throws the following error:
Helm upgrade failed: error while running post render on files: may not
add resource with an already registered id:
PriorityClass.v1.scheduling.k8s.io/critical.[noNs]
Solution: add additional create boolean flag to pod-priority-class to ignore its creation and to allow usage of existing external priority classes
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 with charts/postgres-operator/templates/postgres-pod-priority-class.yaml and the Helm values that control podPriorityClassName. Reproduce the Helm upgrade conflict with an externally managed PriorityClass, then verify that the new create option prevents rendering that resource while PostgreSQL pods still reference the existing class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, postgresql
- Domain
- databases, devops
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100