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.
More on Values & Precedence
What is the precedence order of values in Helm?BeginnerHow are lists merged across values files?IntermediateWhat is the difference between `--set` and `--set-string`?BeginnerHow do you set nested keys, list items and keys containing dots with `--set`?IntermediateWhat are `--set-file`, `--set-json` and `--set-literal` for?IntermediateWhat does `--reuse-values` do and why is it dangerous?Advanced