From feb59f17dc072eedf94e1e89090251c63eafb191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Est=C3=A9vez=20Mart=C3=ADnez?= Date: Tue, 21 May 2019 10:22:42 +0200 Subject: [PATCH] [stable/prometheus-operator] Allow deploying ServiceAccount without RBAC (#13493) Useful for imagePullSecrets Signed-off-by: Marcos Estevez --- stable/prometheus-operator/Chart.yaml | 2 +- stable/prometheus-operator/templates/_helpers.tpl | 6 +++--- .../templates/alertmanager/serviceaccount.yaml | 2 +- .../templates/prometheus-operator/serviceaccount.yaml | 2 +- .../templates/prometheus/serviceaccount.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index 9f433f06a8..3a153c5faa 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -9,7 +9,7 @@ name: prometheus-operator sources: - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 5.7.0 +version: 5.8.0 appVersion: 0.29.0 home: https://github.com/coreos/prometheus-operator keywords: diff --git a/stable/prometheus-operator/templates/_helpers.tpl b/stable/prometheus-operator/templates/_helpers.tpl index 6ec1fa2b18..77992fcf3c 100644 --- a/stable/prometheus-operator/templates/_helpers.tpl +++ b/stable/prometheus-operator/templates/_helpers.tpl @@ -56,7 +56,7 @@ heritage: {{ .Release.Service | quote }} {{/* Create the name of prometheus-operator service account to use */}} {{- define "prometheus-operator.operator.serviceAccountName" -}} -{{- if and .Values.global.rbac.create .Values.prometheusOperator.serviceAccount.create -}} +{{- if .Values.prometheusOperator.serviceAccount.create -}} {{ default (include "prometheus-operator.operator.fullname" .) .Values.prometheusOperator.serviceAccount.name }} {{- else -}} {{ default "default" .Values.prometheusOperator.serviceAccount.name }} @@ -65,7 +65,7 @@ heritage: {{ .Release.Service | quote }} {{/* Create the name of prometheus service account to use */}} {{- define "prometheus-operator.prometheus.serviceAccountName" -}} -{{- if and .Values.global.rbac.create .Values.prometheus.serviceAccount.create -}} +{{- if .Values.prometheus.serviceAccount.create -}} {{ default (include "prometheus-operator.prometheus.fullname" .) .Values.prometheus.serviceAccount.name }} {{- else -}} {{ default "default" .Values.prometheus.serviceAccount.name }} @@ -74,7 +74,7 @@ heritage: {{ .Release.Service | quote }} {{/* Create the name of alertmanager service account to use */}} {{- define "prometheus-operator.alertmanager.serviceAccountName" -}} -{{- if and .Values.global.rbac.create .Values.alertmanager.serviceAccount.create -}} +{{- if .Values.alertmanager.serviceAccount.create -}} {{ default (include "prometheus-operator.alertmanager.fullname" .) .Values.alertmanager.serviceAccount.name }} {{- else -}} {{ default "default" .Values.alertmanager.serviceAccount.name }} diff --git a/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml b/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml index bbed02879b..ccdd15df41 100644 --- a/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.alertmanager.serviceAccount.create }} +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml b/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml index 2cffa7de92..fbf876855e 100644 --- a/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.prometheusOperator.serviceAccount.create }} +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml b/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml index 88df10ad24..bed5f58f14 100644 --- a/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/prometheus/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.prometheus.serviceAccount.create }} +{{- if and .Values.prometheus.enabled .Values.prometheus.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: