HELM _helpers.tpl : How to check if template block is defined in _helpers.tpl?

4/20/2020

I want to check if a template block has been defined in _helpers.tpl.

Sudo Code:

{{- if "sample.color" template is defined }}
color: {{ include "sample.color" . }}
{{- else }}
color: {{ .Values.color }}
{{- end }}

Is there a way to achieve {{- if "sample.color" template is defined }} in helm?

-- mad_boy
kubernetes-helm

0 Answers