fix(argo-cd): Omit runAsUser for dex when deployed on OpenShift#3785
Merged
tico24 merged 2 commits intoargoproj:mainfrom Mar 18, 2026
Merged
fix(argo-cd): Omit runAsUser for dex when deployed on OpenShift#3785tico24 merged 2 commits intoargoproj:mainfrom
tico24 merged 2 commits intoargoproj:mainfrom
Conversation
e2c5934 to
7d0ca2e
Compare
mbevc1
previously approved these changes
Mar 18, 2026
Collaborator
mbevc1
left a comment
There was a problem hiding this comment.
I cannot test this, but it's a follwo-up from a previous PR
Contributor
Author
|
@mbevc1 Here are some more details about the diff, so you could have a better insight: Default values.yaml (with the helm template . -f values.yaml --set=openshift.enabled=false | yq 'select(.kind == "Deployment" and .metadata.name == "release-name-argocd-dex-server") | .spec.template.spec | {"initContainers": .initContainers[0].securityContext, "containers": .containers[0].securityContext }'
initContainers:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1001
seccompProfile:
type: RuntimeDefault
containers:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1001
seccompProfile:
type: RuntimeDefaultvalues.yaml with helm template . -f values.yaml --set=openshift.enabled=enabled | yq 'select(.kind == "Deployment" and .metadata.name == "release-name-argocd-dex-server") | .spec.template.spec | {"initContainers": .initContainers[0].securityContext, "containers": .containers[0].securityContext }'
initContainers:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault |
7d0ca2e to
bff381d
Compare
Signed-off-by: clnrmn <[email protected]>
bff381d to
30ab7d7
Compare
jmeridth
previously approved these changes
Mar 18, 2026
Member
|
@CLNRMN please fix the conflict. Thank you for this contribution. |
Signed-off-by: Colin <[email protected]>
mbevc1
approved these changes
Mar 18, 2026
jmeridth
approved these changes
Mar 18, 2026
1 task
xavier-re
pushed a commit
to xavier-re/argo-helm-xr
that referenced
this pull request
Apr 8, 2026
…proj#3785) Signed-off-by: clnrmn <[email protected]> Signed-off-by: Colin <[email protected]> Signed-off-by: Xavier Renaut <[email protected]>
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.
Checklist:
fix(argo-cd): Omit
runAsUserfor dex when deployed on OpenShiftContext
PR #3749 updated the dex Docker image to v2.45.1 and introduced a hardcoded
runAsUser: 1001in the dexcontainerSecurityContext. This broke deployments on OpenShift.On OpenShift, the restricted / restricted-v2 SCC (Security Context Constraint) assigns UIDs from a namespace-specific range. A hardcoded
runAsUservalue like1001falls outside that allocated range and is rejected, preventing the dex pod from starting.What changed
In
charts/argo-cd/templates/dex/deployment.yaml, thesecurityContextrendering for both the dex container and the copyutil init container now conditionally omitsrunAsUserwhenopenshift.enabledistrue:By omitting runAsUser when openshift.enabled is set, OpenShift's SCC can assign a valid UID from the namespace's allocated range automatically, allowing the dex pod to start successfully.