From f3b3f3ce5bd1b82cd4a735ede1a77deb86734cf1 Mon Sep 17 00:00:00 2001 From: Yuvi Panda Date: Fri, 15 Dec 2017 02:21:50 -0800 Subject: [PATCH] [stable/grafana] Allow setting extra env variables on server (#2903) * [stable/grafana] Allow setting extra env variables on server This allows keeping secret config items (such as auth keys) separate from non-secret config items by setting them in env variables. * [stable/grafana] Bump chart version * [stable/grafana] Try to fix tests --- stable/grafana/README.md | 1 + stable/grafana/templates/deployment.yaml | 4 ++++ stable/grafana/values.yaml | 1 + 3 files changed, 6 insertions(+) diff --git a/stable/grafana/README.md b/stable/grafana/README.md index 12b1dc36bb..6f72b274c4 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -50,3 +50,4 @@ The command removes all the Kubernetes components associated with the chart and | `server.service.externalIPs` | External IP addresses | null | | `server.service.type` | ClusterIP, NodePort, or LoadBalancer| ClusterIP | | `server.setDatasource.enabled` | Creates grafana datasource with job | false | +| `server.extraEnv` | Extra environment variables to set in the server container | {} | diff --git a/stable/grafana/templates/deployment.yaml b/stable/grafana/templates/deployment.yaml index 563ca6d130..16d5489b48 100644 --- a/stable/grafana/templates/deployment.yaml +++ b/stable/grafana/templates/deployment.yaml @@ -51,6 +51,10 @@ spec: name: {{ template "grafana.server.fullname" . }}-config key: grafana-install-plugins {{- end }} + {{- range $key, $value := .Values.server.extraEnv }} + - name: {{ $key | quote }} + value: {{ $value | quote }} + {{- end }} ports: - containerPort: 3000 readinessProbe: diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index ec9608472e..6837015a72 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -8,6 +8,7 @@ server: ## image: "grafana/grafana:latest" + extraEnv: {} nodeSelector: {} tolerations: []