zalando / zalando/postgres-operator
Connection pooler not starting when using psp restricted due to the lack of 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.7.0
- Where do you run it - cloud or metal? Bare Metal K8s
- Are you running Postgres Operator in production? yes
- Type of issue? [Feature request]
We are succesfully using the postgres-operator in production for basic postgresql instances, but we are unable to use the connection pooler feature.
We are enforcing security using PSP which prevent users to run pods with privileged rights aka runAsNonRoot: true
pg bouncer is not starting with a CreateContainerConfigError and the describe of the created pod shows us
Error: container has runAsNonRoot and image has non-numeric user (pgbouncer), cannot verify user is non-root
Looking at the manifest generated, it occur that it lacks of securityContext information.
It would be great the it could be defined in the manifest (or defined by default by the operator)
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 locating the operator code that generates the connection pooler or pgbouncer pod manifest, then inspect how its securityContext is handled. Done means the generated manifest supports the required securityContext and the pooler no longer fails with CreateContainerConfigError under a restricted PSP.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, devops, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100