Skip to content

Commit

Permalink
[stable/grafana] Allow to define GF admin user and admin password in … (
Browse files Browse the repository at this point in the history
helm#11851)

* [stable/grafana] Allow to define GF admin user and admin password in value file as env

Signed-off-by: Cyrille <[email protected]>

* [stable/grafana] Bump version

Signed-off-by: Cyrille <[email protected]>
  • Loading branch information
cyrilledec authored and k8s-ci-robot committed Mar 1, 2019
1 parent 0e99601 commit f7211a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions stable/grafana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f7211a9

Please sign in to comment.