k8wiz
Helm
Medium
Templates

Which function allows templates to fail with a custom error if a required value is missing?

Select your answer:

Show answer and explanation

Answer: required

Explanation

required stops rendering with your message when a value is missing, as in {{ required "image.tag is required" .Values.image.tag }}. Helm also has fail, but it always fails, so you'd wrap it in your own if condition.

Read more about Helm