nindent vs indent in Practice
Inserting blocks at the correct indentation level.
Indentation Matters in YAML
YAML uses spaces to show structure, so a block inserted at the wrong depth breaks the file. Helm gives you helpers to indent output correctly.
What indent Does
The indent function adds a fixed number of spaces to the start of every line in a string, shifting a whole block to the right.
{{ .Values.config | indent 4 }}All lessons in this course
- Assigning Template Variables
- Preserving the Root Dot Inside range
- nindent vs indent in Practice
- Debugging Rendered Whitespace