From 740135ed99739a32a464c571a4f628a5fe71de7d Mon Sep 17 00:00:00 2001 From: Chris Downs Date: Wed, 6 May 2020 22:05:08 -0700 Subject: [PATCH] [stable/grafana] Add extraContainerVolumes (#22264) * [stable/grafana] adding extraContainerVolumes variable with empty list as default. Signed-off-by: Chris Downs * [stable/grafana] if there are volumes defined by extraContainerVolumes, add them to the volumes section of the pod spec Signed-off-by: Chris Downs * [stable/grafana] documenting new extraContainerVolumes variable in README Signed-off-by: Chris Downs * [stable/grafana] bumping chart version Signed-off-by: Chris Downs --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/_pod.tpl | 3 +++ stable/grafana/values.yaml | 8 ++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index f8bde231a7..7f43d3740f 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 5.0.23 +version: 5.0.24 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/README.md b/stable/grafana/README.md index 898cb16fea..6b34e8872c 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -80,6 +80,7 @@ You have to add --force to your helm upgrade command as the labels of the chart | `affinity` | Affinity settings for pod assignment | `{}` | | `extraInitContainers` | Init containers to add to the grafana pod | `{}` | | `extraContainers` | Sidecar containers to add to the grafana pod | `{}` | +| `extraContainerVolumes` | Volumes that can be mounted in sidecar containers | `[]` | | `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | | `persistence.enabled` | Use persistent volume to store data | `false` | | `persistence.type` | Type of persistence (`pvc` or `statefulset`) | `pvc` | diff --git a/stable/grafana/templates/_pod.tpl b/stable/grafana/templates/_pod.tpl index da736383a7..3e1dbebc2d 100644 --- a/stable/grafana/templates/_pod.tpl +++ b/stable/grafana/templates/_pod.tpl @@ -366,4 +366,7 @@ volumes: - name: {{ .name }} emptyDir: {} {{- end -}} +{{- if .Values.extraContainerVolumes }} +{{ toYaml .Values.extraContainerVolumes | indent 2 }} +{{- end }} {{- end }} diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 4e78907535..f628b6ed57 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -191,6 +191,14 @@ extraContainers: | # - name: proxy-web # containerPort: 4181 +## Volumes that can be used in init containers that will not be mounted to deployment pods +extraContainerVolumes: [] +# - name: volume-from-secret +# secret: +# secretName: secret-to-mount +# - name: empty-dir-volume +# emptyDir: {} + ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ ##