Helm's built-in objects and template functions, with the behaviour that causes bugs: default treats 0 as empty, and lookup returns nothing on a dry run.
23 of 23 entries
Built-in objects, flow control, value handling, encoding and the whitespace rules that break templates.
The name of the release, which is what makes one install of a chart distinguishable from another.
.Release.Namename: {{ .Release.Name }}-configThis is reference text: nothing is rendered and no chart is read. Two behaviours are worth committing to memory because they produce bugs rather than errors. default treats 0 and the empty string as empty, so a deliberate replicaCount: 0 silently becomes the default. And lookup returns nothing during helm template, so a template that branches on it renders differently than it installs.
Helm Template Reference runs entirely on your device — this is maintained reference text, and no chart or cluster is read.
You’re on the Free plan. Compare plans
What makes this different from a function list is that the summaries say what goes wrong. `default` returns its default when the value is empty — and empty includes 0 and the empty string, not just nil, which is why a deliberate `replicaCount: 0` silently becomes the default instead.
`lookup` reads from the live cluster and returns an empty map during `helm template` and on a dry run, because there is no cluster to ask. A template that branches on it renders one way when you check it and another way when it installs, which is the hardest kind of chart bug to reproduce.
`nindent` adds a leading newline and `indent` does not. That single difference is the entire reason `{{- toYaml . | nindent 4 }}` works and the same line with `indent` produces a mangled block — the dash eats the newline, and only one of the two puts it back.
Whitespace has a group of its own because dash placement is the commonest cause of a Helm template that produces invalid YAML. A missing dash leaves a stray blank line; a dash on the wrong side eats the indentation of the line below, and the error that comes back is a YAML parse failure pointing at a line you did not write.
This is reference text. Nothing is rendered and no chart is read.
`nindent` emits a newline before indenting; `indent` does not. Because `{{-` strips the preceding newline, a pipeline ending in `nindent` puts it back and one ending in `indent` does not — which is why one produces valid YAML and the other produces a block glued onto the end of the previous line.
Because `default` treats 0 as empty, along with the empty string, an empty list and nil. A deliberate zero is indistinguishable from an unset value to it. `required` or an explicit nil check is what you want when zero is a legitimate value.
Most often `lookup`. It queries the live cluster, and during `helm template` or a dry run there is no cluster, so it returns an empty map and every branch depending on it takes the other path. It is the one function whose result is not reproducible offline.