Templating & Values
The render pipeline in the order a value travels it: supplied on the command line, merged against defaults, bound in a template, emitted as YAML, and debugged when the output is not what you meant. Most Helm bugs are rendering bugs, which is why this is probed hardest.
part ofHelmread it →on this pageshowhide
explore
- Values Precedence4 questions
- Reusing Previous Values4 questions
- Built-in Objects4 questions
- Named Templates4 questions
- Template Functions4 questions
- Whitespace & Indentation4 questions
- Scope & Control Flow3 questions
- Capabilities & Lookup4 questions
- Debugging a Render4 questions
questions
page 2 of 2Why does helm template omit an operator chart's CustomResourceDefinitions from its output?
basics
~20 sFiles under crds/ are plain YAML rather than templates, so the rendering engine never touches them and helm template leaves them out of its output by default. Pass --include-crds to have them emitted alongside the rendered manifests.
In a Helm chart, how can a wrong `nindent` depth render valid YAML and still produce the wrong object?
basics
~20 sYAML checks that a document's layout is consistent, not that keys landed where you meant. A block emitted a couple of columns too shallow can still parse — it simply attaches to an ancestor map instead of the key above it, so the object is well-formed and the setting silently never takes effect.
In a Helm chart, why does `getHostByName` render an empty string?
basics
~20 sHelm keeps DNS resolution switched off during rendering, so sprig's getHostByName returns an empty string unless the rendering command is given --enable-dns. Even then the lookup runs on the machine running helm, not inside the cluster.
In an 18-chart Helm umbrella release, two subcharts each `define` a named template `labels` — what happens?
basics
~20 sNamed templates are global to the release, not scoped per chart: the parent and every subchart load into one namespace. Two definitions of the same name do not conflict loudly — whichever loads last wins, and both charts silently render it.
How do you make Helm drop a key the chart's values.yaml sets, not just override it?
basics
~20 sSet the key to null in your override - key: null in a -f file, or --set key=null. Helm's merge drops a key whose override value is null, so it never reaches .Values. An empty string, {} or [] does not remove it.
showing 31–35 of 35