From b41d0e5eea539fa6d885995f116df50afb2be879 Mon Sep 17 00:00:00 2001 From: Guillaume audic Date: Tue, 28 Apr 2020 04:24:04 +0200 Subject: [PATCH] [stable/grafana] Ability to give a subpath for an extra secret (#22145) * Ability to give a subpath for an extra secret Add the ability to give a subpath for an extra secret. Use case: We use a secret with multiple data and we don't want to override the directory /etc/ssl/certs/ but just add a file. SubPath in volumeMount help to achive this Signed-off-by: Guillaume Audic * [grafana] Add a comment in the values for subPath & Bump chart version Signed-off-by: Guillaume Audic --- stable/grafana/Chart.yaml | 2 +- stable/grafana/templates/_pod.tpl | 1 + stable/grafana/values.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index eeb8c646f6..a6c25fa958 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 5.0.16 +version: 5.0.18 appVersion: 6.7.3 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 5b4e6f2ec0..61cd6ee33b 100644 --- a/stable/grafana/templates/_pod.tpl +++ b/stable/grafana/templates/_pod.tpl @@ -202,6 +202,7 @@ containers: - name: {{ .name }} mountPath: {{ .mountPath }} readOnly: {{ .readOnly }} + subPath: {{ .subPath | default "" }} {{- end }} {{- range .Values.extraVolumeMounts }} - name: {{ .name }} diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 6f32d00507..54789493aa 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -281,6 +281,7 @@ extraSecretMounts: [] # mountPath: /etc/secrets # secretName: grafana-secret-files # readOnly: true + # subPath: "" ## Additional grafana server volume mounts # Defines additional volume mounts.