We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grafana chart: 6.52.9
If I specify a template expression in ingress.hosts value like this:
ingress.hosts
ingress: enabled: true hosts: - monitoring-{{ .Values.global.environment }}.my-hostname.com
it gets copied verbatim to "grafana.ini" section of the ConfigMap:
grafana.ini: | ... [server] domain = monitoring-{{ .Values.global.environment }}.my-hostname.com
"grafana.ini" section definition in configmap.yaml specifies that string values must be processed with tpl function:
configmap.yaml
tpl
grafana.ini: | {{- range $elem, $elemVal := index .Values "grafana.ini" }} {{- if not (kindIs "map" $elemVal) }} {{- if kindIs "invalid" $elemVal }} {{ $elem }} = {{- else if kindIs "string" $elemVal }} {{ $elem }} = {{ tpl $elemVal $ }} {{- else }} {{ $elem }} = {{ $elemVal }} {{- end }} {{- end }} {{- end }} {{- range $key, $value := index .Values "grafana.ini" }} {{- if kindIs "map" $value }} [{{ $key }}] {{- range $elem, $elemVal := $value }} {{- if kindIs "invalid" $elemVal }} {{ $elem }} = {{- else if kindIs "string" $elemVal }} {{ $elem }} = {{ tpl $elemVal $ }} {{- else }} {{ $elem }} = {{ $elemVal }} {{- end }} {{- end }} {{- end }} {{- end }}
and double quotes around grafana.ini.server.domain value in values.yaml lead me to believe this value should be considered as a string kind:
grafana.ini.server.domain
values.yaml
grafana.ini: server: domain: "{{ if (and .Values.ingress.enabled .Values.ingress.hosts) }}{{ .Values.ingress.hosts | first }}{{ else }}''{{ end }}"
What could be the reason for tpl function not being applied to this value?
The text was updated successfully, but these errors were encountered:
I just had the same issue.
My workaround for now is to redefine grafana.ini.server.domain:
ingress: enabled: true hosts: - "grafana.{{ .Values.global.publicDomain }}" grafana.ini: server: domain: "grafana.{{ .Values.global.publicDomain }}"
Sorry, something went wrong.
Patch grafana#2343
5f2dcb9
Add tpl for host in grafana.ini
52d8f90
Add tpl for host in grafana.ini Signed-off-by: Nanori <yannick.lucet@gmail.com>
No branches or pull requests
Grafana chart: 6.52.9
If I specify a template expression in
ingress.hosts
value like this:it gets copied verbatim to "grafana.ini" section of the ConfigMap:
"grafana.ini" section definition in
configmap.yaml
specifies that string values must be processed withtpl
function:and double quotes around
grafana.ini.server.domain
value invalues.yaml
lead me to believe this value should be considered as a string kind:What could be the reason for
tpl
function not being applied to this value?The text was updated successfully, but these errors were encountered: