From 61c164c09d2f440cbb7e53e2d4c1160f31daae73 Mon Sep 17 00:00:00 2001 From: Dan Vulpe Date: Mon, 16 Mar 2020 19:10:31 +0000 Subject: [PATCH] =?UTF-8?q?[stable/grafana]=20Revert=20"[stable/grafana]?= =?UTF-8?q?=20move=20datasource=20provider=20to=20containers=20(#209?= =?UTF-8?q?=E2=80=A6=20(#21442)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "[stable/grafana] move datasource provider to containers (#20985)" This reverts commit 18e4853b fixes #20909 Signed-off-by: Dan Vulpe * updated version to 5.0.7 Signed-off-by: Dan Vulpe --- stable/grafana/Chart.yaml | 2 +- stable/grafana/templates/_pod.tpl | 56 +++++++++++++++---------------- stable/grafana/values.yaml | 4 --- 3 files changed, 29 insertions(+), 33 deletions(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index ba79fbd9f4..6fae60a11c 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 5.0.6 +version: 5.0.7 appVersion: 6.6.2 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/stable/grafana/templates/_pod.tpl b/stable/grafana/templates/_pod.tpl index e0e6e6fc58..23842821be 100644 --- a/stable/grafana/templates/_pod.tpl +++ b/stable/grafana/templates/_pod.tpl @@ -13,7 +13,7 @@ securityContext: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} -{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.extraInitContainers) }} +{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.datasources.enabled .Values.extraInitContainers) }} initContainers: {{- end }} {{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }} @@ -58,6 +58,33 @@ initContainers: readOnly: {{ .readOnly }} {{- end }} {{- end }} +{{- if .Values.sidecar.datasources.enabled }} + - name: {{ template "grafana.name" . }}-sc-datasources + image: "{{ .Values.sidecar.image }}" + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + - name: METHOD + value: LIST + - name: LABEL + value: "{{ .Values.sidecar.datasources.label }}" + - name: FOLDER + value: "/etc/grafana/provisioning/datasources" + - name: RESOURCE + value: "both" + {{- if .Values.sidecar.datasources.searchNamespace }} + - name: NAMESPACE + value: "{{ .Values.sidecar.datasources.searchNamespace }}" + {{- end }} + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + resources: +{{ toYaml .Values.sidecar.resources | indent 6 }} + volumeMounts: + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +{{- end}} {{- if .Values.extraInitContainers }} {{ toYaml .Values.extraInitContainers | indent 2 }} {{- end }} @@ -94,33 +121,6 @@ containers: volumeMounts: - name: sc-dashboard-volume mountPath: {{ .Values.sidecar.dashboards.folder | quote }} -{{- end}} -{{- if .Values.sidecar.datasources.enabled }} - - name: {{ template "grafana.name" . }}-sc-datasources - image: "{{ .Values.sidecar.image }}" - imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} - env: - - name: METHOD - value: {{ .Values.sidecar.datasources.watchMethod }} - - name: LABEL - value: "{{ .Values.sidecar.datasources.label }}" - - name: FOLDER - value: "/etc/grafana/provisioning/datasources" - - name: RESOURCE - value: "both" - {{- if .Values.sidecar.datasources.searchNamespace }} - - name: NAMESPACE - value: "{{ .Values.sidecar.datasources.searchNamespace }}" - {{- end }} - {{- if .Values.sidecar.skipTlsVerify }} - - name: SKIP_TLS_VERIFY - value: "{{ .Values.sidecar.skipTlsVerify }}" - {{- end }} - resources: -{{ toYaml .Values.sidecar.resources | indent 6 }} - volumeMounts: - - name: sc-datasources-volume - mountPath: "/etc/grafana/provisioning/datasources" {{- end}} - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 15144bfe12..c7b633aae5 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -458,8 +458,6 @@ sidecar: # skipTlsVerify: true dashboards: enabled: false - ## Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. - watchMethod: WATCH SCProvider: true # label that the configmaps with dashboards are marked with label: grafana_dashboard @@ -487,8 +485,6 @@ sidecar: allowUiUpdates: false datasources: enabled: false - ## Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. - watchMethod: WATCH # label that the configmaps with datasources are marked with label: grafana_datasource # If specified, the sidecar will search for datasource config-maps inside this namespace.