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: