0Pricing
Helm Academy · Lesson

fail and Custom Validation Guards

Stopping rendering with clear, actionable errors.

Guarding Bad Input

Charts should reject nonsensical configuration early. A good template can stop rendering and tell the user exactly what went wrong.

Stopping with fail

The fail function halts template rendering immediately and prints the message you give it as the error.

{{ fail "service.port must be set" }}

All lessons in this course

  1. Deep Merge with mergeOverwrite and dict
  2. tpl: Rendering Strings from Values
  3. Looping Files with range Over .Files.Glob
  4. fail and Custom Validation Guards
← Back to Helm Academy