Interview Prep/Helm/Values & Precedence

How do you remove a default value set in a chart's `values.yaml`?

IntermediateConceptValues & Precedence
Answer

Set it to null in your values file or with --set key=null. Helm deletes the key during coalescing, so with/if blocks treat it as unset.

api:
  resources:
    limits:
      cpu: null   # remove the chart's CPU limit, keep memory

This is the only way to "unset" a map key; setting it to {} keeps the key with an empty map, which also works for with blocks but not for all templates.

All Helm questions Roadmap: Helm

More on Values & Precedence