Skip to content

Commit

Permalink
[kube-prometheus-stack] separate prometheus-operator/admission-webhoo…
Browse files Browse the repository at this point in the history
…ks/job-patch from the rbac creation (prometheus-community#4554)

Signed-off-by: Maven35 <Charles.Tony.Gibbs@gmail.com>
  • Loading branch information
rgaduput authored and Maven35 committed Jun 6, 2024
1 parent e27e284 commit 41d6e62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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: 58.6.0
version: 58.6.1
appVersion: v0.73.2
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
@@ -1,4 +1,4 @@
{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.prometheusOperator.admissionWebhooks.patch.serviceAccount.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -10,6 +10,7 @@ metadata:
labels:
app: {{ template "kube-prometheus-stack.name" $ }}-admission
{{- include "kube-prometheus-stack.prometheus-operator-webhook.labels" $ | nindent 4 }}
automountServiceAccountToken: {{ .Values.prometheusOperator.admissionWebhooks.patch.serviceAccount.automountServiceAccountToken }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2 }}
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 @@ -2480,6 +2480,12 @@ prometheusOperator:
runAsUser: 2000
seccompProfile:
type: RuntimeDefault
## Service account for Prometheus Operator Webhook Job Patch to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
create: true
automountServiceAccountToken: true

# Security context for create job container
createSecretJob:
Expand Down

0 comments on commit 41d6e62

Please sign in to comment.