diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index 9895486b48b7..09caf42c136a 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus appVersion: v2.47.2 -version: 25.6.0 +version: 25.7.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/deploy.yaml b/charts/prometheus/templates/deploy.yaml index 9ccdccfe4fe1..93f93c44ca88 100644 --- a/charts/prometheus/templates/deploy.yaml +++ b/charts/prometheus/templates/deploy.yaml @@ -47,6 +47,9 @@ spec: {{- end }} {{- end }} serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }} +{{- if kindIs "bool" .Values.server.automountServiceAccountToken }} + automountServiceAccountToken: {{ .Values.server.automountServiceAccountToken }} +{{- end }} {{- if .Values.server.extraInitContainers }} initContainers: {{ toYaml .Values.server.extraInitContainers | indent 8 }} diff --git a/charts/prometheus/templates/serviceaccount.yaml b/charts/prometheus/templates/serviceaccount.yaml index cf1503451a6d..6d5ab0c7d966 100644 --- a/charts/prometheus/templates/serviceaccount.yaml +++ b/charts/prometheus/templates/serviceaccount.yaml @@ -8,7 +8,9 @@ metadata: namespace: {{ include "prometheus.namespace" . }} annotations: {{ toYaml .Values.serviceAccounts.server.annotations | indent 4 }} -{{- if .Values.serviceAccounts.server.automountServiceAccountToken }} +{{- if kindIs "bool" .Values.server.automountServiceAccountToken }} +automountServiceAccountToken: {{ .Values.server.automountServiceAccountToken }} +{{- else if kindIs "bool" .Values.serviceAccounts.server.automountServiceAccountToken }} automountServiceAccountToken: {{ .Values.serviceAccounts.server.automountServiceAccountToken }} {{- end }} {{- end }} diff --git a/charts/prometheus/templates/sts.yaml b/charts/prometheus/templates/sts.yaml index e0693b865e1c..63851c4db3d9 100644 --- a/charts/prometheus/templates/sts.yaml +++ b/charts/prometheus/templates/sts.yaml @@ -52,6 +52,9 @@ spec: {{- end }} {{- end }} serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }} +{{- if kindIs "bool" .Values.server.automountServiceAccountToken }} + automountServiceAccountToken: {{ .Values.server.automountServiceAccountToken }} +{{- end }} {{- if .Values.server.extraInitContainers }} initContainers: {{ toYaml .Values.server.extraInitContainers | indent 8 }} diff --git a/charts/prometheus/values.yaml b/charts/prometheus/values.yaml index c68e8c19cf4b..43d0f6ab43e3 100644 --- a/charts/prometheus/values.yaml +++ b/charts/prometheus/values.yaml @@ -19,7 +19,10 @@ serviceAccounts: create: true name: "" annotations: {} - # automountServiceAccountToken: + + ## Opt out of automounting Kubernetes API credentials. + ## It will be overriden by server.automountServiceAccountToken value, if set. + # automountServiceAccountToken: false ## Additional labels to attach to all resources commonMetaLabels: {} @@ -98,6 +101,10 @@ server: ## name: server + ## Opt out of automounting Kubernetes API credentials. + ## If set it will override serviceAccounts.server.automountServiceAccountToken value for ServiceAccount. + # automountServiceAccountToken: false + ## Use a ClusterRole (and ClusterRoleBinding) ## - If set to false - we define a RoleBinding in the defined namespaces ONLY ##