What does nindent do in Helm templates and why does it matter?
⚡
Quick Answer
nindent adds a newline and indents a block by N spaces so included snippets align correctly in YAML.
Detailed Answer
YAML is whitespace-sensitive, and indentation bugs are the top Helm frustration. include a helper (like labels) and pipe through | nindent 4 to place it at the right depth. indent (no leading newline) vs nindent (with newline) trips people up.
Code Example
labels:
{{- include "app.labels" . | nindent 4 }}💡
Interview Tip
Explain the newline difference between indent and nindent.
helmtemplatingnindent