{{- with .Values.environment.staging }}
value: {{ .baseUrl }}
{{- end }}
I want to set the environment value staging
dynamically based on the key value pair stored in podAnnotations
.
{{- $envValue := .Values.podAnnotations.environment }}
The above two expressions work independently but not when combined as following:
{{- with .Values.environment "." $envValue }}
value: {{ .baseUrl }}
{{- end }}
I'm not exactly sure how to concatenate a local variable within the with
statement in helm
. Solution to fix the problem or any links to documentation would be useful.