Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-adapter] Add automountServiceAccountToken flags #4931

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-adapter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-adapter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-adapter/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus-adapter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: {}
Expand Down