fix(gh-cli): use numeric USER 1000 so kubelet runAsNonRoot validates#5
Merged
fix(gh-cli): use numeric USER 1000 so kubelet runAsNonRoot validates#5
Conversation
Loosens the Push to registry gate so manual workflow_dispatch runs publish to ghcr in addition to push-to-main events. Pull request runs continue to skip the step (validation only). Lets the user kick off a fresh build+push of one or all images from the Actions pane "Run workflow" button without needing a no-op commit on main to trigger via paths.
…sses USER gh resolves to a name in image config; kubelet can't validate non-root without a numeric UID, so consumers either had to set runAsUser explicitly or skip runAsNonRoot. Use the existing UID (1000) directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pods running this image with
securityContext.runAsNonRoot: truefail to start:container has runAsNonRoot and image has non-numeric user (gh), cannot verify user is non-root. Kubelet can only validate non-root from a numeric UID in the image config.The
ghuser is already created with UID 1000 in the sameRUN; just switch theUSERdirective to1000.Pairs with
kustomize-clusterPR —bootstrap/ci-token-sync-job.yamlJob uses this image and setsrunAsNonRoot: true.Test plan
ghuser (UID 1000, same shell, sameWORKDIR /home/gh)ci-token-syncJob in argocd ns runs to completion🤖 Generated with Claude Code