Helm Notable Values: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
m (Ovidiu moved page Helm Numeric Zero to Helm Notable Values without leaving a redirect)
Line 3: Line 3:
* [[Helm_Template_Function_empty#Numeric_Zero|empty()]]
* [[Helm_Template_Function_empty#Numeric_Zero|empty()]]


=Overview=
=Numeric Zero=


For a numeric zero declared as:
For a numeric zero declared as:
Line 23: Line 23:
{{ if (eq 0 (int .Values.myValue)) }}
{{ if (eq 0 (int .Values.myValue)) }}
</syntaxhighlight>
</syntaxhighlight>
=Empty Value=
<syntaxhighlight lang='yaml'>
myValue:
</syntaxhighlight>
=Empty String=

Revision as of 08:23, 5 January 2021

Internal

Numeric Zero

For a numeric zero declared as:

myValue: 0

the following expressions evaluate to false:

Evaluates to false:

{{ if .Values.myValue }}

the following expressions evaluate to true:

{{ if empty .Values.myValue }}
{{ if (eq 0 (int .Values.myValue)) }}

Empty Value

myValue:


Empty String