From 845c7fad1857680d37cfbe08a5d460cc627af0ce Mon Sep 17 00:00:00 2001 From: Emil Kordahl <89079229+emilkor1@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:48:52 +0100 Subject: [PATCH] [kube-prometheus-stack] extraVolumes and extraVolumeMounts (#4300) Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com> --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/prometheus-operator/deployment.yaml | 12 ++++++++++-- charts/kube-prometheus-stack/values.yaml | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 13ad5445145e..8500e72b0b72 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 56.12.0 +version: 56.13.0 appVersion: v0.71.2 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml index 7d561c6cedcb..9c2de0657754 100644 --- a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml @@ -151,17 +151,25 @@ spec: {{ toYaml .Values.prometheusOperator.resources | indent 12 }} securityContext: {{ toYaml .Values.prometheusOperator.containerSecurityContext | indent 12 }} -{{- if .Values.prometheusOperator.tls.enabled }} volumeMounts: + {{- if .Values.prometheusOperator.tls.enabled }} - name: tls-secret mountPath: /cert readOnly: true + {{- end }} + {{- with .Values.prometheusOperator.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} volumes: + {{- if .Values.prometheusOperator.tls.enabled }} - name: tls-secret secret: defaultMode: 420 secretName: {{ template "kube-prometheus-stack.fullname" . }}-admission -{{- end }} + {{- end }} + {{- with .Values.prometheusOperator.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.prometheusOperator.dnsConfig }} dnsConfig: {{ toYaml . | indent 8 }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index 748d84b6fb59..e70c2384b0a0 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -2756,6 +2756,14 @@ prometheusOperator: ## automountServiceAccountToken: true + ## Additional volumes + ## + extraVolumes: [] + + ## Additional volume mounts + ## + extraVolumeMounts: [] + ## Deploy a Prometheus instance ## prometheus: