Skip to content

fix: runAsUser in yaml is unneeded as its set in the Dockerfile#546

Merged
SgtCoDFish merged 1 commit intomasterfrom
fix/VC-34650-runas-breaks-openshift
Jul 10, 2024
Merged

fix: runAsUser in yaml is unneeded as its set in the Dockerfile#546
SgtCoDFish merged 1 commit intomasterfrom
fix/VC-34650-runas-breaks-openshift

Conversation

@ThatsMrTalbot
Copy link

This also fixes an issue in OpenShift where OpenShift wants you to use a certain range of UIDs that 1000 does not fall into:

.containers[0].runAsUser: Invalid value: 1000: must be in the ranges: [1000660000, 1000669999]

By not specifying an runAsUser in the yaml, OpenShift picks a appropriate UID for you:

$ kubectl get deployment venafi-kubernetes-agent | grep runAsUser
$ kubectl get pod venafi-kubernetes-agent-6b8f756ffb-rmb45 -o yaml | grep runAsUser
      runAsUser: 1000660000

Since the Dockerfile contains the USER directive this should have no effect on non OpenShift Kubernetes clusters.

This also fixes an issue in OpenShift where OpenShift wants you to use a certain range of UIDs that 1000 does not fall into. By not specifying an runAsUser in the yaml, OpenShift picks a appropriate UID for you.

Since the Dockerfile contains the USER directive this should have no effect on non OpenShift Kubernetes clusters.

Signed-off-by: Adam Talbot <adam.talbot@venafi.com>
Copy link
Contributor

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Seems reasonable given the openshift situation!

@SgtCoDFish SgtCoDFish merged commit 6baaa57 into master Jul 10, 2024
@SgtCoDFish SgtCoDFish deleted the fix/VC-34650-runas-breaks-openshift branch July 10, 2024 11:12
@ThatsMrTalbot ThatsMrTalbot mentioned this pull request Jul 10, 2024
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.

2 participants