diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index c3af79577..cb8c1e990 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -153,12 +153,15 @@ Template functions and pipelines are a powerful way to transform information and Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with paranthesis. ```yaml +{{/* include the body of this if statement when the variable .Values.fooString exists and is set to "foo" */}} {{ if and .Values.fooString (eq .Values.fooString "foo") }} - #Include this when the variable .Values.fooString exists and is set to "foo" + {{ ... }} {{ end }} -{{ if or .Values.unsetVariable (not .Values.setVariable) }} - #do not include this because unset variables evaluate to false and .Values.setVariable was negated with the not function. + +{{/* do not include the body of this if statement because unset variables evaluate to false and .Values.setVariable was negated with the not function. */}} +{{ if or .Values.anUnsetVariable (not .Values.aSetVariable) }} + {{ ... }} {{ end }} ```