Use case: I have values.yaml where I have a field mode.
Values.yaml
mode: start
or user can enter a value for the field mode in any of the below mentioned ways:
mode: STart or START or sTart
Now, I have a file where I am using an if condition as shown below:
command: {{ if eq .Values.mode "start" }} do this {{ esle }} do that {{ end }}
Now, my challenge is how can I covert the ".Values.mode" into lower alphabets before doing the comparison. I have tried the below mentioned ways:
1.
{{ if eq .Values.mode | lower "start" }} do this {{ esle }} do that {{ end }}
{{ if eq lower .Values.mode "start" }} do this {{ esle }} do that {{ end }}
Both of the above methods errored out.
Note: we are using a third-party tool, hence JSON schema check won't help me.