From a782b2eed96dea4a3aa0910705f338fb6a98b00c Mon Sep 17 00:00:00 2001 From: Ben Bettridge Date: Mon, 1 Mar 2021 18:42:36 +1300 Subject: [PATCH 1/3] Use tpl for grafana.ini config options in order to support values.yaml templating. Signed-off-by: Ben Bettridge --- charts/grafana/templates/configmap.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/grafana/templates/configmap.yaml b/charts/grafana/templates/configmap.yaml index 0d2c3e2779..24ecc1a1d7 100644 --- a/charts/grafana/templates/configmap.yaml +++ b/charts/grafana/templates/configmap.yaml @@ -13,7 +13,11 @@ data: {{- range $key, $value := index .Values "grafana.ini" }} [{{ $key }}] {{- range $elem, $elemVal := $value }} - {{ $elem }} = {{ $elemVal }} + {{- if kindIs "invalid" $elemVal }} + {{ $elem }} = + {{- else }} + {{ $elem }} = {{ printf "%v" $elemVal }} + {{- end }} {{- end }} {{- end }} From d919157de0b58d97422063463aa17fd8b084cb1b Mon Sep 17 00:00:00 2001 From: Ben Bettridge Date: Mon, 1 Mar 2021 18:52:14 +1300 Subject: [PATCH 2/3] Use toYaml instead of sprintf Signed-off-by: Ben Bettridge --- charts/grafana/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/grafana/templates/configmap.yaml b/charts/grafana/templates/configmap.yaml index 24ecc1a1d7..6207b81a9a 100644 --- a/charts/grafana/templates/configmap.yaml +++ b/charts/grafana/templates/configmap.yaml @@ -16,7 +16,7 @@ data: {{- if kindIs "invalid" $elemVal }} {{ $elem }} = {{- else }} - {{ $elem }} = {{ printf "%v" $elemVal }} + {{ $elem }} = {{ tpl (toYaml $elemVal) $ }} {{- end }} {{- end }} {{- end }} From 8b5a1fa5a57d680bcc4095944e32e8874b2a0b74 Mon Sep 17 00:00:00 2001 From: Ben Bettridge Date: Mon, 1 Mar 2021 18:56:34 +1300 Subject: [PATCH 3/3] Bump version number Signed-off-by: Ben Bettridge --- charts/grafana/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/grafana/Chart.yaml b/charts/grafana/Chart.yaml index 864b5a7792..ccd052de65 100644 --- a/charts/grafana/Chart.yaml +++ b/charts/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: grafana -version: 6.4.4 +version: 6.4.5 appVersion: 7.4.2 kubeVersion: '^1.8.0-0' description: The leading tool for querying and visualizing time series and metrics.