diff --git a/helm/kube-prometheus/Chart.yaml b/helm/kube-prometheus/Chart.yaml index 8501a3281..588eddf1d 100644 --- a/helm/kube-prometheus/Chart.yaml +++ b/helm/kube-prometheus/Chart.yaml @@ -9,4 +9,4 @@ maintainers: name: kube-prometheus sources: - https://github.com/coreos/prometheus-operator -version: 0.0.52 +version: 0.0.53 diff --git a/helm/kube-prometheus/requirements.yaml b/helm/kube-prometheus/requirements.yaml index 6f55b61df..b110ae1ee 100644 --- a/helm/kube-prometheus/requirements.yaml +++ b/helm/kube-prometheus/requirements.yaml @@ -6,7 +6,7 @@ dependencies: condition: deployAlertManager - name: prometheus - version: 0.0.27 + version: 0.0.28 #e2e-repository: file://../prometheus repository: https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ diff --git a/helm/prometheus/Chart.yaml b/helm/prometheus/Chart.yaml index 88c4c91b6..241a0d7c2 100755 --- a/helm/prometheus/Chart.yaml +++ b/helm/prometheus/Chart.yaml @@ -7,4 +7,4 @@ maintainers: name: prometheus sources: - https://github.com/coreos/prometheus-operator -version: 0.0.27 +version: 0.0.28 diff --git a/helm/prometheus/templates/_helpers.tpl b/helm/prometheus/templates/_helpers.tpl index c6f230bbf..b23c57087 100755 --- a/helm/prometheus/templates/_helpers.tpl +++ b/helm/prometheus/templates/_helpers.tpl @@ -34,3 +34,14 @@ Return the appropriate apiVersion value to use for the prometheus-operator manag {{- printf "%s" "monitoring.coreos.com/v1alpha1" -}} {{- end -}} {{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "prometheus.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "prometheus.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/helm/prometheus/templates/prometheus.yaml b/helm/prometheus/templates/prometheus.yaml index dfbe0ed60..4c323d5e1 100755 --- a/helm/prometheus/templates/prometheus.yaml +++ b/helm/prometheus/templates/prometheus.yaml @@ -53,7 +53,7 @@ spec: {{ toYaml .Values.secrets | indent 4 }} {{- end }} {{- if .Values.global.rbacEnable }} - serviceAccountName: {{ template "prometheus.fullname" . }} + serviceAccountName: {{ template "prometheus.serviceAccountName" .}} {{- end }} {{ if and .Values.config.specifiedInValues .Values.config.value }} {{- else if .Values.serviceMonitorsSelector }} diff --git a/helm/prometheus/templates/serviceaccount.yaml b/helm/prometheus/templates/serviceaccount.yaml index 5f159e6a1..90ae6794b 100644 --- a/helm/prometheus/templates/serviceaccount.yaml +++ b/helm/prometheus/templates/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.global.rbacEnable }} +{{- if and .Values.global.rbacEnable .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: @@ -7,5 +7,5 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "prometheus.fullname" . }} + name: {{ template "prometheus.serviceAccountName" .}} {{- end }} diff --git a/helm/prometheus/values.yaml b/helm/prometheus/values.yaml index a7301dd92..1232a3947 100644 --- a/helm/prometheus/values.yaml +++ b/helm/prometheus/values.yaml @@ -97,6 +97,12 @@ paused: false global: rbacEnable: true +## serviceAccount to use by Prometheus +## +serviceAccount: + create: true + name: "" + ## Number of Prometheus replicas desired ## replicaCount: 1