Skip to content

feat(plugin-barman-cloud): add possibility to unset runAsUser and runAsGroup#742

Merged
phisco merged 2 commits intocloudnative-pg:mainfrom
Pidu2:dev/673
Apr 22, 2026
Merged

feat(plugin-barman-cloud): add possibility to unset runAsUser and runAsGroup#742
phisco merged 2 commits intocloudnative-pg:mainfrom
Pidu2:dev/673

Conversation

@Pidu2
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Signed-off-by: Beat Schärz <beatschaerz@hotmail.com>
@bmfdi
Copy link
Copy Markdown

bmfdi commented Feb 27, 2026

I'd really like to have this merged into main. Could you please continue to work on this topic or should we open a new MR?

@Farioko
Copy link
Copy Markdown

Farioko commented Mar 30, 2026

When is this getting merged?

@salmar-pnsf
Copy link
Copy Markdown

This is a non trivial change that blocks deployment on e.g Openshift. Can we get this merged?

@Pidu2
Copy link
Copy Markdown
Contributor Author

Pidu2 commented Apr 20, 2026

@phisco who can get this merged? :)

@phisco
Copy link
Copy Markdown
Collaborator

phisco commented Apr 20, 2026

Closing and reopening to get ci to run

@phisco phisco closed this Apr 20, 2026
@phisco phisco reopened this Apr 20, 2026
@phisco
Copy link
Copy Markdown
Collaborator

phisco commented Apr 20, 2026

Can you rebase, @Pidu2? I'll merge it once ci is green.

@Pidu2
Copy link
Copy Markdown
Contributor Author

Pidu2 commented Apr 22, 2026

@phisco rebased, I think someone needs to approve the CI runs.

@Pidu2
Copy link
Copy Markdown
Contributor Author

Pidu2 commented Apr 22, 2026

I don't think the broken CI is caused by my change 😅

@phisco phisco merged commit 4a9040f into cloudnative-pg:main Apr 22, 2026
27 of 29 checks passed
@Pidu2 Pidu2 deleted the dev/673 branch April 22, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart( plugin-barman-cloud ) Related to the plugin-barman-cloud chart 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.

6 participants