postgres-operator
postgres-operator copied to clipboard
New feature: set RunAsNonRoot on securityContext of Postgres statfullset
Why: On namespaces with security policy, Postgres cannot be deployed as the security context cannot be customized on the CRD. Postgres CRD allow only to setup a custom user with spiloRunAsUser, this PR will set RunAsNonRoot to true when spiloRunAsUser is set.
Example of security policies that block the deployment of Postgres:
- https://kyverno.io/policies/pod-security/restricted/require-run-as-nonroot/require-run-as-nonroot/
- https://catalog.kpt.dev/gatekeeper/v0.2/gatekeeper-disallow-root-user/?id=gatekeeper-disallow-root-user
Hello is there someone still working on securityContext topics?
+1