stakater / Reloader

A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!
https://docs.stakater.com/reloader/
Apache License 2.0
7.12k stars 476 forks source link

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

Open pypp opened 1 week ago

pypp commented 1 week ago

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

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

vaggeliskls commented 2 days ago

I also verify that bug. Details: