From f54435ea9c0f445ea881030ff7ef804ac61cadb0 Mon Sep 17 00:00:00 2001 From: Dat Tang Date: Mon, 29 Mar 2021 10:37:50 +0200 Subject: [PATCH] [UI] Parameterize TEAMS list (#1375) * Parameterize TEAMS list * Update charts/postgres-operator-ui/values.yaml * Update charts/postgres-operator-ui/values.yaml Co-authored-by: Dat Tang Co-authored-by: Felix Kunde --- charts/postgres-operator-ui/templates/deployment.yaml | 7 +++++-- charts/postgres-operator-ui/values.yaml | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/postgres-operator-ui/templates/deployment.yaml b/charts/postgres-operator-ui/templates/deployment.yaml index 29bf2e670..9b5faea90 100644 --- a/charts/postgres-operator-ui/templates/deployment.yaml +++ b/charts/postgres-operator-ui/templates/deployment.yaml @@ -18,7 +18,7 @@ spec: labels: app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - team: "acid" # Parameterize? + team: "{{ join "," .Values.envs.teams }}" spec: serviceAccountName: {{ include "postgres-operator-ui.serviceAccountName" . }} {{- if .Values.imagePullSecrets }} @@ -54,7 +54,10 @@ spec: - name: "TEAMS" value: |- [ - "acid" + {{- range(initial .Values.envs.teams) }} + {{ . | quote }}, + {{- end }} + {{ last .Values.envs.teams | quote }} ] - name: "OPERATOR_UI_CONFIG" value: |- diff --git a/charts/postgres-operator-ui/values.yaml b/charts/postgres-operator-ui/values.yaml index 926d99b39..b8e147c05 100644 --- a/charts/postgres-operator-ui/values.yaml +++ b/charts/postgres-operator-ui/values.yaml @@ -15,7 +15,7 @@ image: # Secrets must be manually created in the namespace. # ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod # imagePullSecrets: -# - name: +# - name: rbac: # Specifies whether RBAC resources should be created @@ -45,6 +45,8 @@ envs: operatorClusterNameLabel: "cluster-name" resourcesVisible: "False" targetNamespace: "default" + teams: + - "acid" # configure UI service service: