I'd like to use some code like below to describe a comma is the substring of the string.
{{- if contains '\,' .alias }}
But it reports the error in the line when using helm lint
invalid syntax
How to write it correctly?
Thanks to community user Bimal.
It can be applied like:
{{- if contains "," .Values.xxx.name }}
some_data: {{ .Values.xxx.name }}
{{- end }}
For further reference please follow String Functions: