Skip to content

Conversation

@Pidu2
Copy link

@Pidu2 Pidu2 commented Dec 3, 2025

This PR addresses the requirements of #673.

In an OpenShift environment, you usually do not want to set runAsUser or runAsGroup to something specific, instead it is chosen automatically by the cluster to a random value.

With this change, runAsUser and runAsGroup can be set to null and are therefore skipped when rendering.


values.yaml

containerSecurityContext:
  runAsUser: null
  runAsGroup: null

result

❯ helm template . --values values-barman.yaml -s templates/deployment.yaml | yq .spec.template.spec.containers.0.securityContext
allowPrivilegeEscalation: false
capabilities:
  drop:
    - ALL
readOnlyRootFilesystem: true
seccompProfile:
  type: RuntimeDefault

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 3, 2025
Copy link
Collaborator

@phisco phisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pidu2 can you fix the DCO failure in CI? otherwise LGTM 🙏

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants