Commit 403af2c3 authored by René Filip's avatar René Filip Committed by Matthew Fisher

Update control_structures.md (#4948)

update position of `and` operator
Signed-off-by: 's avatarRené Filip <rene.filip@sap.com>
parent 560b84d5
......@@ -53,7 +53,7 @@ data:
myvalue: "Hello World"
drink: {{ .Values.favorite.drink | default "tea" | quote }}
food: {{ .Values.favorite.food | upper | quote }}
{{ if (.Values.favorite.drink) and eq .Values.favorite.drink "coffee" }}mug: true{{ end }}
{{ if and (.Values.favorite.drink) (eq .Values.favorite.drink "coffee") }}mug: true{{ end }}
```
Note that `.Values.favorite.drink` must be defined or else it will throw an error when comparing it to "coffee". Since we commented out `drink: coffee` in our last example, the output should not include a `mug: true` flag. But if we add that line back into our `values.yaml` file, the output should look like this:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment