zalando / zalando/postgres-operator
Support for securityContext
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.8.0
- Where do you run it - cloud or metal? Kubernetes or OpenShift? k8s
- Are you running Postgres Operator in production? not yet
- Type of issue? Feature
Hi, I planned to use the operator in a production cluster but I want to have undefined securityContext in this cluster. Cause I can't specify securityContext directly to the postgres manifests or by an other way, I tried using gatekeeper mutations to assign securityContext to the StatefulSet containers, it seems to works but after some sync period the operator says :
time="2022-05-05T08:49:32Z" level=info msg="reason: new statefulset containers's postgres (index 0) security context does not match the current one" cluster-name=int-postgres/acid-postgres-cluster pkg=cluster
time="2022-05-05T08:49:32Z" level=info msg="reason: new statefulset containers's exporter (index 1) security context does not match the current one" cluster-name=int-postgres/acid-postgres-cluster pkg=cluster
time="2022-05-05T08:49:44Z" level=info msg="there are 2 pods in the cluster to recreate" cluster-name=int-postgres/acid-postgres-cluster pkg=cluster
And as it says, the pods are recreated (with always the securityContext specified with my mutations policies) every sync period time...
Are there any plans to implement support securityContext for the StatefulSet/Pods created by the operator?
Thanks
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 by tracing how the operator builds and compares the PostgreSQL StatefulSet and its pod containers, using the reported security-context mismatch and pod-recreation logs as entry points. Determine how securityContext should be configured for the StatefulSet/Pods and verify that the resulting context is preserved without repeated reconciliation or pod recreation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100