-
Notifications
You must be signed in to change notification settings - Fork 914
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
specifying a root user runner for images that require it is ignored.
helm-charts/charts/jenkins/templates/_helpers.tpl
Lines 468 to 473 in 13a4e96
| {{- if or $additionalContainers.runAsUser $.Values.agent.runAsUser }} | |
| runAsUser: {{ $additionalContainers.runAsUser | default $.Values.agent.runAsUser }} | |
| {{- end }} | |
| {{- if or $additionalContainers.runAsGroup $.Values.agent.runAsGroup }} | |
| runAsGroup: {{ $additionalContainers.runAsGroup | default $.Values.agent.runAsGroup }} | |
| {{- end }} |
this only does a falsey check which will always return false for 0
Version of Helm and Kubernetes
- Helm: version.BuildInfo{Version:"v3.18.3", GitCommit:"6838ebcf265a3842d1433956e8a622e3290cf324", GitTreeState:"clean", GoVersion:"go1.24.4"}
- Kubernetes:
Client Version: v1.34.1
Kustomize Version: v5.4.2
Server Version: v1.33.5-eks-113cf36Chart version
5.8.64
What happened?
1. set additionalContainer[0].runAsUser = 0
2. no value is set at all in deployed config
3. does not need a truthy global runAsUser to reproduceWhat you expected to happen?
the additional container should explicitly set 0
How to reproduce it
agent:
additionalContainers:
- sideContainerName: dind
image:
repository: docker
tag: 26-dind
command: dockerd-entrypoint.sh
runAsUser: 0Anything else we need to know?
Related issues: helm/helm#3164
Seems as though the correct solution would be to call toString <optionalvalue> to guarantee explicit 0 is parsed correctly
using runAsUser: "0" seems to work
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working