0Pricing
Helm Academy · Lesson

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

  1. The Double-Brace Action Syntax
  2. Trimming Whitespace with Dash Markers
  3. Comments and Quoting in Templates
  4. Common YAML Indentation Traps
← Back to Helm Academy