Helm Notable Values: Difference between revisions
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
* [[Helm_Template_If/Else#Numeric_Zero|If/Else]] | * [[Helm_Template_If/Else#Numeric_Zero|If/Else]] | ||
* [[Helm_Template_Function_empty#Numeric_Zero|empty()]] | * [[Helm_Template_Function_empty#Numeric_Zero|empty()]] | ||
* [[Helm_Templates#Helm_Template_Function_Reference|Functions]] | |||
=Numeric Zero= | =Numeric Zero= |
Revision as of 08:28, 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)) }}
Boolean True
Boolean False
Empty Value (nil)
myValue:
{{ printf "%T" .Values.myValue }}
returns "<nil>"