zalando / zalando/postgres-operator
Running as non root on VMware Tanzu
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Hey,
We tried to deploy the operator using this in the manifest to allow pod to run as non root:
kubernetes_use_configmaps: "false"
spilo_allow_privilege_escalation: "false"
spilo_runasuser: 101
spilo_runasgroup: 103
spilo_fsgroup: 103
spilo_privileged: "false"
pod are now starting but we have issue like this:
runsv pgqd: fatal: unable to start ./run: access denied
and this is not working as expected.
As a workaround we deployed custom images with this:
`RUN chown -R postgres:postgres /bin
#/etc/hosts and /etc/resolv.conf cannot be chowned
#RUN chown -R postgres:postgres /etc
RUN chown -R postgres:postgres /lib
RUN chown -R postgres:postgres /run
RUN chown -R postgres:postgres /sbin
RUN chown -R postgres:postgres /usr
RUN chown -R postgres:postgres /var
RUN chown postgres:postgres /launch.sh
RUN sed -i '10 a rm /etc/supervisor/conf.d/cron.conf' /launch.sh
USER 101
`
But this is clearly not the way to do it...
Images used are lastest released.
Do you have any idea on what can be the solution with official images?
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 reproducing the deployment with the listed non-root manifest settings and the latest official images, then investigate why the pgqd run script reports access denied under VMware Tanzu. Compare this with the permissions and startup behavior in the custom image workaround. Done means the official images start successfully as the configured non-root user without custom image changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- databases, infrastructure, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100