From 41cc5a4e20223bd638198e4a39641fff6ac7503d Mon Sep 17 00:00:00 2001 From: Ilia Lazebnik Date: Sun, 22 Oct 2023 14:27:30 +0300 Subject: [PATCH] [prometheus] Allow setting automountServiceAccountToken (#3911) * Allow turning setting automountServiceAccountToken Signed-off-by: drfaust92 * Allow turning setting automountServiceAccountToken Signed-off-by: drfaust92 --------- Signed-off-by: drfaust92 Signed-off-by: Sacha --- charts/prometheus/Chart.yaml | 2 +- charts/prometheus/templates/serviceaccount.yaml | 3 +++ charts/prometheus/values.schema.json | 3 +++ charts/prometheus/values.yaml | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index 72f5413a0141..e006811d6978 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus appVersion: v2.47.0 -version: 25.1.0 +version: 25.2.0 kubeVersion: ">=1.19.0-0" description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/charts/prometheus/templates/serviceaccount.yaml b/charts/prometheus/templates/serviceaccount.yaml index 273aa7eed118..cf1503451a6d 100644 --- a/charts/prometheus/templates/serviceaccount.yaml +++ b/charts/prometheus/templates/serviceaccount.yaml @@ -8,4 +8,7 @@ metadata: namespace: {{ include "prometheus.namespace" . }} annotations: {{ toYaml .Values.serviceAccounts.server.annotations | indent 4 }} +{{- if .Values.serviceAccounts.server.automountServiceAccountToken }} +automountServiceAccountToken: {{ .Values.serviceAccounts.server.automountServiceAccountToken }} +{{- end }} {{- end }} diff --git a/charts/prometheus/values.schema.json b/charts/prometheus/values.schema.json index f904812298bd..0b09912abb09 100644 --- a/charts/prometheus/values.schema.json +++ b/charts/prometheus/values.schema.json @@ -711,6 +711,9 @@ }, "name": { "type": "string" + }, + "automountServiceAccountToken": { + "type": "boolean" } } } diff --git a/charts/prometheus/values.yaml b/charts/prometheus/values.yaml index b47ec9921c36..ff71bdfe1887 100644 --- a/charts/prometheus/values.yaml +++ b/charts/prometheus/values.yaml @@ -14,6 +14,7 @@ serviceAccounts: create: true name: "" annotations: {} + # automountServiceAccountToken: ## Monitors ConfigMap changes and POSTs to a URL ## Ref: https://github.com/prometheus-operator/prometheus-operator/tree/main/cmd/prometheus-config-reloader