Helm Named Template Recipes: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Helm Templates") |
|||
Line 2: | Line 2: | ||
* [[Helm_Templates#Named_Template_Recipes|Helm Templates]] | * [[Helm_Templates#Named_Template_Recipes|Helm Templates]] | ||
=Variable Equivalent= | |||
Define the partial in _helpers.tpl: | |||
<syntaxhighlight lang='yaml'> | |||
{{- define "mychart.nuancedColor" -}} | |||
{{- printf "%s-%s" .Values.nuance .Values.color -}} | |||
{{- end -}} | |||
</syntaxhighlight> | |||
Use it: | |||
<syntaxhighlight lang='yaml'> | |||
... | |||
nuancedColor: {{ template "mychart.nuancedColor" . }} | |||
... | |||
</syntaxhighlight> |
Latest revision as of 17:50, 30 August 2019
Internal
Variable Equivalent
Define the partial in _helpers.tpl:
{{- define "mychart.nuancedColor" -}}
{{- printf "%s-%s" .Values.nuance .Values.color -}}
{{- end -}}
Use it:
...
nuancedColor: {{ template "mychart.nuancedColor" . }}
...