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

@henrik242 henrik242 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

uid set on containers[] entries was silently ignored. The pod securityContext read only
container.uid (singular) and fell back to the default 1000, and the per-container
securityContext set no runAsUser at all, so pods using the containers list always ran as
uid 1000. Since uid is schema-valid on every entry, this failed silently rather than erroring.

Each entry's uid now renders as runAsUser/runAsGroup on that container, and the pod-level
securityContext (including fsGroup) follows the first entry's uid, falling back to
container.uid. Same fix in cron.yaml. The schema now rejects uid: 0, which
runAsNonRoot: true has always made unschedulable.

Single-container charts are unaffected. Rendered against all five fixture/helm values files,
the only change is that each container's securityContext now spells out
runAsUser/runAsGroup: 1000, matching the pod-level value that already applied.

entur/gha-helm#121 currently works around this by duplicating container.uid: 101 next to
containers[0].uid: 101, with a comment to drop it "once this fixture's common dependency is
bumped to a release that includes that fix". Worth landing before the v2.0.0 GA tag so the uid
change ships inside the major rather than as a later patch bump.

Note: helm-docs also corrected the charts/common/README.md version badge from 2.0.0 to
2.0.0-rc-1. That is pre-existing drift against Chart.yaml, not a change from this PR.

@henrik242
henrik242 requested a review from a team as a code owner June 15, 2026 07:55
uid on containers[] entries was ignored; those pods always ran as 1000.
Each entry now renders runAsUser/runAsGroup, and the pod-level
securityContext follows the first entry's uid.

Schema rejects uid 0, which runAsNonRoot has always made unschedulable.
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