From a6c786d9cca4cceb11415c61ced05946296cdb2d Mon Sep 17 00:00:00 2001 From: alaric Date: Tue, 2 May 2023 21:15:35 +0200 Subject: [PATCH] additional serviceaccounts in values Add the possibility to define additional serviceAccounts in the Helm value file(s). --- .../operator-service-account-rbac-openshift.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup/helm/operator/templates/operator-service-account-rbac-openshift.yaml b/setup/helm/operator/templates/operator-service-account-rbac-openshift.yaml index 26b770a..de1cfdd 100644 --- a/setup/helm/operator/templates/operator-service-account-rbac-openshift.yaml +++ b/setup/helm/operator/templates/operator-service-account-rbac-openshift.yaml @@ -233,6 +233,12 @@ subjects: - kind: ServiceAccount name: postgres-operator namespace: {{ .Values.operatorSettings.operator_namespace }} +# loop through additional target namespaces +{{- range .Values.operatorSettings.subjects }} +- kind: ServiceAccount +  name: postgres-operator +  namespace: {{ .namespace }} +{{- end }} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -280,4 +286,4 @@ rules: # resourceNames: # - privileged # verbs: -# - use \ No newline at end of file +# - use