From bb69a1edd68cffe6aec4be8bfaa47f38135e8af8 Mon Sep 17 00:00:00 2001 From: Kevin Lau Date: Fri, 2 Aug 2019 09:22:15 -0700 Subject: [PATCH] Clarify operator docs wording The original is explaining the negation, when the body would not be included. Which would happen in the complement of the if expression, ie. flipped by De Morgan's law's: ``` not (or .Values.anUnsetVariable (not .Values.aSetVariable)) == and (not .Values.anUnsetVariable) .Values.aSetVariable ``` > unset variables evaluate to false is equivalent to `not .Values.anUnsetVariable`. > and is equivalent to `and`. > .Values.setVariable was negated with the not function doesn't seem to match `.Values.aSetVariable`. To me, that would be `not .Values.aSetVariable` instead. Anyway, explaining the `if` expression as-is and not the negation is clearer and parallels the first `if` operator. Signed-off-by: Kevin Lau --- docs/chart_template_guide/functions_and_pipelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index 1c099887d..bbce53e71 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -159,7 +159,7 @@ Operators are implemented as functions that return a boolean value. To use `eq`, {{ end }} -{{/* do not include the body of this if statement because unset variables evaluate to false and .Values.setVariable was negated with the not function. */}} +{{/* include the body of this if statement when the variable .Values.anUnsetVariable is set or .values.aSetVariable is not set */}} {{ if or .Values.anUnsetVariable (not .Values.aSetVariable) }} {{ ... }} {{ end }}