From 1249e9e0d5d76ab1bd9f54a80bd3799f8f5913bd Mon Sep 17 00:00:00 2001 From: Ankit Mehta Date: Fri, 2 Apr 2021 04:33:35 -0400 Subject: [PATCH] Allows to set automountServiceAccountToken on ServiceAccount (#808) Signed-off-by: Ankit Mehta --- charts/prometheus-elasticsearch-exporter/Chart.yaml | 2 +- .../templates/serviceaccount.yaml | 1 + charts/prometheus-elasticsearch-exporter/values.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-elasticsearch-exporter/Chart.yaml b/charts/prometheus-elasticsearch-exporter/Chart.yaml index b4825fc2f5c4..7a520092f9b8 100644 --- a/charts/prometheus-elasticsearch-exporter/Chart.yaml +++ b/charts/prometheus-elasticsearch-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Elasticsearch stats exporter for Prometheus name: prometheus-elasticsearch-exporter -version: 4.3.0 +version: 4.4.0 kubeVersion: ">=1.10.0-0" appVersion: 1.1.0 home: https://github.com/justwatchcom/elasticsearch_exporter diff --git a/charts/prometheus-elasticsearch-exporter/templates/serviceaccount.yaml b/charts/prometheus-elasticsearch-exporter/templates/serviceaccount.yaml index aaf68b79ca85..9b14c283ffce 100644 --- a/charts/prometheus-elasticsearch-exporter/templates/serviceaccount.yaml +++ b/charts/prometheus-elasticsearch-exporter/templates/serviceaccount.yaml @@ -8,4 +8,5 @@ metadata: app: {{ template "elasticsearch-exporter.name" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/prometheus-elasticsearch-exporter/values.yaml b/charts/prometheus-elasticsearch-exporter/values.yaml index 0da1232049e1..62f98ad677bd 100644 --- a/charts/prometheus-elasticsearch-exporter/values.yaml +++ b/charts/prometheus-elasticsearch-exporter/values.yaml @@ -247,6 +247,7 @@ prometheusRule: serviceAccount: create: false name: default + automountServiceAccountToken: true # Creates a PodSecurityPolicy and the role/rolebinding # allowing the serviceaccount to use it