0PricingLogin
Helm Academy · Lesson

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

  1. Assigning Template Variables
  2. Preserving the Root Dot Inside range
  3. nindent vs indent in Practice
  4. Debugging Rendered Whitespace
← Back to Helm Academy