there are multiple stackoverflow answers regarding passing multiple variables to a template in Helm, using dictionary.
However, I want to pass a single variable to a template. For example, I want to define template such as below, receiving input (a string to be exact).
{{- define "blahblah" $var }}
{{- if .Values.nameOverride }}
name: {{ .Values.nameOverride }}-$var
{{- else }}
name: $var
{{- end }}
{{- end }}
Thus, writing like below, I expect the result to be name: myname-whatever
or name:whatever
(assuming .Values.nameOverride
was defined as 'myname')
{{- include "blahblah" "whatever" }}
How can I let helm know which is the input variable to the template? Thank you!