Trimming Whitespace with Dash Markers
Using the dash to keep rendered YAML clean.
Actions Leave Gaps
When a control action like if renders, the line it sat on often leaves behind a blank line. In YAML, stray blank lines can quietly break things. 😬
Meet the Dash
Helm gives you a fix: add a dash inside the braces. It tells the engine to chew up the whitespace next to that action.
{{- .Values.name }}All lessons in this course
- The Double-Brace Action Syntax
- Trimming Whitespace with Dash Markers
- Comments and Quoting in Templates
- Common YAML Indentation Traps