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

[kube-prometheus-stack] Add support to make automountServiceAccountToken configurable for Prometheus #4170

Merged
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/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 60.3.0
version: 60.4.0
appVersion: v0.74.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metadata:
{{ toYaml .Values.prometheus.annotations | indent 4 }}
{{- end }}
spec:
automountServiceAccountToken: {{ .Values.prometheus.prometheusSpec.automountServiceAccountToken }}
{{- if and (not .Values.prometheus.agentMode) (or .Values.prometheus.prometheusSpec.alertingEndpoints .Values.alertmanager.enabled) }}
alerting:
alertmanagers:
Expand Down
6 changes: 6 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3380,6 +3380,12 @@ prometheus:

## If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos
##
## AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in the pod,
## If the field isn’t set, the operator mounts the service account token by default.
## Warning: be aware that by default, Prometheus requires the service account token for Kubernetes service discovery,
## It is possible to use strategic merge patch to project the service account token into the ‘prometheus’ container.
automountServiceAccountToken: true

disableCompaction: false
## APIServerConfig
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig
Expand Down