diff --git a/charts/prometheus-adapter/Chart.yaml b/charts/prometheus-adapter/Chart.yaml index 4acb30ed29fd..350162984be6 100644 --- a/charts/prometheus-adapter/Chart.yaml +++ b/charts/prometheus-adapter/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: prometheus-adapter -version: 4.11.0 +version: 4.11.1 appVersion: v0.12.0 description: A Helm chart for k8s prometheus adapter home: https://github.com/kubernetes-sigs/prometheus-adapter diff --git a/charts/prometheus-adapter/templates/deployment.yaml b/charts/prometheus-adapter/templates/deployment.yaml index 981f7dcde0f7..4036411818f5 100644 --- a/charts/prometheus-adapter/templates/deployment.yaml +++ b/charts/prometheus-adapter/templates/deployment.yaml @@ -37,6 +37,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} serviceAccountName: {{ template "k8s-prometheus-adapter.serviceAccountName" . }} {{- if .Values.hostNetwork.enabled }} hostNetwork: true diff --git a/charts/prometheus-adapter/templates/serviceaccount.yaml b/charts/prometheus-adapter/templates/serviceaccount.yaml index 30a169ae0e9c..81535a8490db 100644 --- a/charts/prometheus-adapter/templates/serviceaccount.yaml +++ b/charts/prometheus-adapter/templates/serviceaccount.yaml @@ -1,6 +1,7 @@ {{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} metadata: labels: {{- include "k8s-prometheus-adapter.labels" . | indent 4 }} diff --git a/charts/prometheus-adapter/values.yaml b/charts/prometheus-adapter/values.yaml index 36a986efff4b..c3c1b51d7bce 100644 --- a/charts/prometheus-adapter/values.yaml +++ b/charts/prometheus-adapter/values.yaml @@ -74,6 +74,9 @@ psp: ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl +# If false then the user will opt out of automounting API credentials. +automountServiceAccountToken: true + serviceAccount: # Specifies whether a service account should be created create: true @@ -84,6 +87,8 @@ serviceAccount: # Use case: AWS EKS IAM roles for service accounts # ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html annotations: {} + # If false then the user will opt out of automounting API credentials. + automountServiceAccountToken: true # Custom DNS configuration to be added to prometheus-adapter pods dnsConfig: {}