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.
More medium Helm questions
- What is an OCI registry in the context of Helm?
- Which command logs you into an OCI registry for pushing/pulling charts?
- What is a library chart used for?
- Which field in Chart.yaml specifies the chart API version (e.g., v1) and affects Chart.lock format?
- What is the recommended way to store sensitive data for templates instead of hard-coding in values?
- Which flag to 'helm install' creates the namespace if it doesn't already exist?