From 2d582dc9a6bb003f84ef80e0aa730d1baa8e1c4e Mon Sep 17 00:00:00 2001 From: Borna Skukan Date: Fri, 6 Dec 2019 02:04:51 +0100 Subject: [PATCH] [stable/grafana] Fix conflict when using multiple grafana providers (#19177) * Trying to alleviate change introduced in #15770 by making multiple provisioners optional. Also bumped version and added entry to README. Signed-off-by: Borna Skukan * Further version bump Signed-off-by: Borna Skukan * Making default behaviour same as before Signed-off-by: Borna Skukan --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/_pod.tpl | 4 +++- stable/grafana/values.yaml | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index ccdb95bcef7a..5c74de22845b 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 4.1.0 +version: 4.1.1 appVersion: 6.5.0 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 fcc14de9301c..be6e6fb8ba91 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -113,6 +113,7 @@ This version requires Helm >= 2.12.0. | `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` | | `sidecar.resources` | Sidecar resources | `{}` | | `sidecar.dashboards.enabled` | Enables the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` | +| `sidecar.dashboards.SCProvider` | Enables creation of sidecar provider | `true` | `sidecar.dashboards.provider.name` | Unique name of the grafana provider | `sidecarProvider` | | `sidecar.dashboards.provider.orgid` | Id of the organisation, to which the dashboards should be added | `1` | | `sidecar.dashboards.provider.folder` | Logical folder in which grafana groups dashboards | `""` | diff --git a/stable/grafana/templates/_pod.tpl b/stable/grafana/templates/_pod.tpl index 8018dd7e234e..e31396ccbeee 100644 --- a/stable/grafana/templates/_pod.tpl +++ b/stable/grafana/templates/_pod.tpl @@ -184,10 +184,12 @@ containers: {{- if .Values.sidecar.dashboards.enabled }} - name: sc-dashboard-volume mountPath: {{ .Values.sidecar.dashboards.folder | quote }} +{{ if .Values.sidecar.dashboards.SCProvider }} - name: sc-dashboard-provider mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml" subPath: provider.yaml {{- end}} +{{- end}} {{- if .Values.sidecar.datasources.enabled }} - name: sc-datasources-volume mountPath: "/etc/grafana/provisioning/datasources" @@ -332,7 +334,7 @@ volumes: {{- if .Values.sidecar.dashboards.enabled }} - name: sc-dashboard-volume emptyDir: {} -{{- if .Values.sidecar.dashboards.enabled }} +{{- if .Values.sidecar.dashboards.SCProvider }} - name: sc-dashboard-provider configMap: name: {{ template "grafana.fullname" . }}-config-dashboards diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 0b06a7d2ea47..648787156b4c 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -432,6 +432,7 @@ sidecar: # skipTlsVerify: true dashboards: enabled: false + SCProvider: true # label that the configmaps with dashboards are marked with label: grafana_dashboard # folder in the pod that should hold the collected dashboards (unless `defaultFolderName` is set)