How best to say a value is required in a helm chart?

Define the required values on top of your manifest as variables utilizing the required function.

E.g. deployment.yaml:

{{- $name := .Values.name | required ".Values.name is required." -}}

---
apiVersion: apps/v1
kind: Deployment
metadata: 
  name: {{ $name }}
 ....

Leave a Comment