zalando / zalando/postgres-operator

no option to use an existing priorityClassName for posgres Pods or make podPriorityClassName value configurable

Open
#2,441 0 comments 2 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?: 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.