Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] null doesn't remove default value of deployment.securityContext.runAsUser #700

Closed
pypp opened this issue Jun 23, 2024 · 3 comments
Closed
Labels
kind/bug Something isn't working

Comments

@pypp
Copy link

pypp commented Jun 23, 2024

Describe the bug
Can't override the default value of deployment.securityContext.runAsUser with null using sub-chart.

To Reproduce

# Chart.yaml

apiVersion: v2
name: reloader-subchart
description: A Helm chart for reloader
type: application
version: 1.0.0
appVersion: "1.0.0"
# values.yaml

reloader:
  reloader:
    isOpenshift: true
    deployment:
      securityContext:
        runAsUser: null

run

helm template -f values/values.yaml .

Expected behavior
That the returned chart will override the default value of deployment.securityContext.runAsUser.

Environment

  • Operator Version: 1.0.97
  • Kubernetes/OpenShift Version: N/A
  • Helm Version: v3.11.1+6.el8

Additional context
This is a known bug in the newer versions of Helm, helm/helm#12637

@pypp pypp added the kind/bug Something isn't working label Jun 23, 2024
@pypp pypp closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
@pypp pypp changed the title [BUG] null doesn't remove default value of deployment.securityContext.runAsUser=null [BUG] null doesn't remove default value of deployment.securityContext.runAsUser Jun 23, 2024
@pypp pypp reopened this Jun 23, 2024
@vaggeliskls
Copy link

I also verify that bug.
Details:

  • Reloader Chart Version: 1.0.115
  • Kubernetes version: 1.28.10
  • OpenShift version: 4.15.16
  • Helm version 3.14

@MuneebAijaz
Copy link
Contributor

hi @pypp i see there's a PR in helm for fix this issue helm/helm#12879.

Can you meanwhile try omitting the whole securityContext struct to see if it fixes your issue?

    deployment:
      securityContext: []

@pypp
Copy link
Author

pypp commented Jul 8, 2024

hi @MuneebAijaz, thank you for your help that solution indeed fixed my issue.

@pypp pypp closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants