Skip to content

fix(common): honor uid per entry in the containers list - #261

Open
henrik242 wants to merge 1 commit into
entur:mainfrom
henrik242:fix/containers-uid
Open

fix(common): honor uid per entry in the containers list#261
henrik242 wants to merge 1 commit into
entur:mainfrom
henrik242:fix/containers-uid

Conversation

@henrik242

Copy link
Copy Markdown

uid set on containers[] entries was silently ignored: the pod securityContext only read container.uid (singular) and fell back to the default 1000, and the per-container securityContext never set runAsUser. Pods using the containers list always ran as uid 1000.

The pod securityContext (incl. fsGroup) now follows the first container entry's uid, and each entry's uid renders as runAsUser/runAsGroup on its own container. Same fix applied to cron.yaml. Single-container pods run as the same uid as before; the only rendered change is that each container's securityContext now also spells out runAsUser/runAsGroup (previously only the pod-level securityContext did).

This fixes the root cause for the failing entur/gha-helm#120 (https://github.com/entur/gha-helm/actions/runs/27414274923/job/81022995404)

uid set on containers[] entries was silently ignored: the pod
securityContext only read container.uid (singular) and fell back to
the default 1000, and the per-container securityContext never set
runAsUser. Pods using the containers list always ran as uid 1000.

The pod securityContext (incl. fsGroup) now follows the first
container entry's uid, and each entry's uid renders as
runAsUser/runAsGroup on its own container. Same fix applied to
cron.yaml. Single-container pods run as the same uid as before; the
only rendered change is that each container's securityContext now
also spells out runAsUser/runAsGroup (previously only the pod-level
securityContext did).
@henrik242
henrik242 requested a review from a team as a code owner June 15, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant