You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chart: add pod-level securityContext (podSecurityContext) for all workloads #8114
needs/areaIssue or PR needs to be labeled to indicate what parts of the code base are affectedneeds/kindIssue or PR needs to be labeled to clarify its natureneeds/priorityPriority has not yet been determined; a good signal that maintainers aren't fully committed
Add a pod-level security context to the chart: global.podSecurityContext plus a per-component podSecurityContext (api, controller, management controller, both webhooks servers, garbage collector, Dex, bundled PostgreSQL, migrations), rendered into spec.template.spec.securityContext. This mirrors the existing securityContext / global.securityContext pattern, which today only reaches the container-level securityContext.
Default it to {}, so rendered manifests don't change unless a user sets it.
Motivation and Use Case
Some settings only exist at pod level, or are much simpler to set there, and the chart currently has no way to set them:
fsGroup / fsGroupChangePolicy: needed when the bundled PostgreSQL runs as non-root on a PVC, so the data directory is writable.
seccompProfile: RuntimeDefault for the whole pod, including init containers such as the CA-bundle init container, which doesn't use the component's container-level securityContext.
runAsNonRoot / runAsUser / runAsGroup / supplementalGroups applied to every container in the pod.
sysctls and similar pod-only fields.
Pod Security Admission restricted checks some of these at pod level, and the usual workaround is post-rendering.
Alternatives Considered
Tightening the default container securityContext (runAsNonRoot, capabilities.drop: [ALL], readOnlyRootFilesystem, seccompProfile): stronger, but it changes behaviour and could break the bundled PostgreSQL and user-supplied sidecars, so it's better as a separate discussion.
Post-rendering with kustomize: works, but every user has to repeat it.
needs/areaIssue or PR needs to be labeled to indicate what parts of the code base are affectedneeds/kindIssue or PR needs to be labeled to clarify its natureneeds/priorityPriority has not yet been determined; a good signal that maintainers aren't fully committed
Activity