From 98105e477e97201fa11ed4cfaaa9f91e9e24e566 Mon Sep 17 00:00:00 2001 From: PLACE Date: Thu, 17 Jan 2019 09:53:37 +1100 Subject: [PATCH] grafana will now tpl datasources (#10603) * grafana will now tpl datasources Signed-off-by: James Batt * updated docs Signed-off-by: James Batt * version bump Signed-off-by: James Batt --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 2 +- stable/grafana/templates/configmap.yaml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index 488efa2a93..6f70c7104d 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 1.25.0 +version: 1.25.1 appVersion: 5.4.3 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/stable/grafana/README.md b/stable/grafana/README.md index 9cd4c101a6..97be4b8482 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -66,7 +66,7 @@ The command removes all the Kubernetes components associated with the chart and | `extraVolumeMounts` | Additional grafana server volume mounts | `[]` | | `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` | | `plugins` | Plugins to be loaded along with Grafana | `[]` | -| `datasources` | Configure grafana datasources | `{}` | +| `datasources` | Configure grafana datasources (passed through tpl) | `{}` | | `dashboardProviders` | Configure grafana dashboard providers | `{}` | | `dashboards` | Dashboards to import | `{}` | | `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` | diff --git a/stable/grafana/templates/configmap.yaml b/stable/grafana/templates/configmap.yaml index a499e1f8a1..5fc14c53fc 100644 --- a/stable/grafana/templates/configmap.yaml +++ b/stable/grafana/templates/configmap.yaml @@ -20,9 +20,10 @@ data: {{- end }} {{- if .Values.datasources }} +{{ $root := . }} {{- range $key, $value := .Values.datasources }} {{ $key }}: | -{{ toYaml $value | indent 4 }} +{{ tpl (toYaml $value | indent 4) $root }} {{- end -}} {{- end -}}