From f7211a9c35c438cbb30f9db71c04e0f981ff68bf Mon Sep 17 00:00:00 2001 From: cyrilleomise <46990478+cyrilleomise@users.noreply.github.com> Date: Fri, 1 Mar 2019 12:04:33 +0700 Subject: [PATCH] =?UTF-8?q?[stable/grafana]=20Allow=20to=20define=20GF=20a?= =?UTF-8?q?dmin=20user=20and=20admin=20password=20in=20=E2=80=A6=20(#11851?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [stable/grafana] Allow to define GF admin user and admin password in value file as env Signed-off-by: Cyrille * [stable/grafana] Bump version Signed-off-by: Cyrille --- stable/grafana/Chart.yaml | 2 +- stable/grafana/templates/deployment.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index 5aca5f8031..3a93f14cbb 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 2.2.0 +version: 2.2.1 appVersion: 6.0.0 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/stable/grafana/templates/deployment.yaml b/stable/grafana/templates/deployment.yaml index e79a51e832..5f2cd1e985 100644 --- a/stable/grafana/templates/deployment.yaml +++ b/stable/grafana/templates/deployment.yaml @@ -206,16 +206,20 @@ spec: containerPort: 3000 protocol: TCP env: + {{- if not .Values.env.GF_SECURITY_ADMIN_USER }} - name: GF_SECURITY_ADMIN_USER valueFrom: secretKeyRef: name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} key: {{ .Values.admin.userKey | default "admin-user" }} + {{- end }} + {{- if not .Values.env.GF_SECURITY_ADMIN_PASSWORD }} - name: GF_SECURITY_ADMIN_PASSWORD valueFrom: secretKeyRef: name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} key: {{ .Values.admin.passwordKey | default "admin-password" }} + {{- end }} {{- if .Values.plugins }} - name: GF_INSTALL_PLUGINS valueFrom: