From 42636e4c217025048fdfc5d00199a88da0fdc61c Mon Sep 17 00:00:00 2001 From: gil0109 Date: Tue, 23 Apr 2024 20:35:00 -0700 Subject: [PATCH] Update template to provide the ability to create multipe databases --- .../crunchy-postgres/templates/PostgresCluster.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/charts/crunchy-postgres/templates/PostgresCluster.yaml b/charts/crunchy-postgres/templates/PostgresCluster.yaml index 7ed5cdd..d90cadc 100644 --- a/charts/crunchy-postgres/templates/PostgresCluster.yaml +++ b/charts/crunchy-postgres/templates/PostgresCluster.yaml @@ -72,8 +72,11 @@ spec: postgres-operator.crunchydata.com/cluster: {{ template "crunchy-postgres.fullname" . }} postgres-operator.crunchydata.com/instance-set: {{ .Values.instances.name }}-ha - - users: + + users: +{{- if .Values.users }} +{{ toYaml .Values.users | nindent 4 }} +{{- else }} - name: {{ template "crunchy-postgres.fullname" . }} databases: - {{ template "crunchy-postgres.fullname" . }} @@ -81,7 +84,8 @@ spec: - name: postgres databases: - {{ template "crunchy-postgres.fullname" . }} - + {{- end }} + backups: pgbackrest: {{ if .Values.pgBackRest.image }} @@ -194,4 +198,4 @@ spec: matchLabels: postgres-operator.crunchydata.com/cluster: {{ .Values.instances.name }} - postgres-operator.crunchydata.com/role: pgbouncer + postgres-operator.crunchydata.com/role: pgbouncer \ No newline at end of file