Helm Variables: Difference between revisions
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
* [[Helm_Templates#Variables|Helm Templates]] | * [[Helm_Templates#Variables|Helm Templates]] | ||
=Overview= | =Overview= | ||
A variable is a named reference to another object. It is assigned and referred using the $<name> syntax: | |||
<syntaxhighlight lang='yaml'> | |||
{{- $relname := .Release.Name -}} | |||
... | |||
data: | |||
release: {{ $relname }} | |||
</syntaxhighlight> | |||
Variables are less frequently used, as an alternative preferred construct is the [[Helm_Named_Templates|named template]]. | Variables are less frequently used, as an alternative preferred construct is the [[Helm_Named_Templates|named template]]. |
Revision as of 00:55, 8 October 2020
External
Internal
Overview
A variable is a named reference to another object. It is assigned and referred using the $<name> syntax:
{{- $relname := .Release.Name -}}
...
data:
release: {{ $relname }}
Variables are less frequently used, as an alternative preferred construct is the named template.