Helm _helpers.tpl: Calling defined templates in other template definitions

You can use (include ... ) syntax. Example of including previously defined template foo:

{{- define "bar" -}}
{{- printf "%s-%s" (include "foo" .) .Release.Namespace | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Leave a Comment