concept

Go templates and values

A Helm chart uses Go text templates plus Helm functions. The dot (.) is the current input context. At the top level, .Values contains merged values and .Release contains release metadata. Rendering is not a Kubernetes operation by default.

Formal Syntax & Structure

kubernetes syntaxkubernetes
{{ include "NAME" . | nindent 4 }}

Working Example

Example Snippetkubernetes
{{- define "catalog.v1.labels" -}}app.kubernetes.io/name: catalogapp.kubernetes.io/instance: {{ .Release.Name | quote }}{{- end -}}
Kubernetes Reference