From f01c0232e88cf2974524f751eaa477097a8f255a Mon Sep 17 00:00:00 2001 From: DerekHeldtWerle Date: Tue, 15 Jan 2019 14:54:24 -0800 Subject: [PATCH] Add extraConfigmapMounts for certs/dashboards in specific folders (#10679) Signed-off-by: Derek Heldt-Werle --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/deployment.yaml | 10 ++++++++++ stable/grafana/values.yaml | 8 ++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index 99024dc6f7..488efa2a93 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 1.24.2 +version: 1.25.0 appVersion: 5.4.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 6a26348171..9cd4c101a6 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -64,6 +64,7 @@ The command removes all the Kubernetes components associated with the chart and | `envFromSecret` | Name of a Kubenretes secret (must be manually created in the same namespace) containing values to be added to the environment | `""` | | `extraSecretMounts` | Additional grafana server secret mounts | `[]` | | `extraVolumeMounts` | Additional grafana server volume mounts | `[]` | +| `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` | | `plugins` | Plugins to be loaded along with Grafana | `[]` | | `datasources` | Configure grafana datasources | `{}` | | `dashboardProviders` | Configure grafana dashboard providers | `{}` | diff --git a/stable/grafana/templates/deployment.yaml b/stable/grafana/templates/deployment.yaml index 519cd40c2f..799eff092c 100644 --- a/stable/grafana/templates/deployment.yaml +++ b/stable/grafana/templates/deployment.yaml @@ -137,6 +137,11 @@ spec: mountPath: "/etc/grafana/ldap.toml" subPath: ldap.toml {{- end }} + {{- range .Values.extraConfigmapMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + {{- end }} - name: storage mountPath: "/var/lib/grafana" {{- if .Values.persistence.subPath }} @@ -258,6 +263,11 @@ spec: - name: config configMap: name: {{ template "grafana.fullname" . }} + {{- range .Values.extraConfigmapMounts }} + - name: {{ .name }} + configMap: + name: {{ .configMap }} + {{- end }} {{- if .Values.dashboards }} {{- range keys .Values.dashboards }} - name: dashboards-{{ . }} diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 74fd1bd0f5..68ca5f0ca3 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -39,6 +39,14 @@ securityContext: runAsUser: 472 fsGroup: 472 + +extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ + # configMap: certs-configmap + # readOnly: true + + ## Assign a PriorityClassName to pods if set # priorityClassName: