From 4291c3d18c6511b024c757d69affeef77ecd6495 Mon Sep 17 00:00:00 2001 From: alexlebens Date: Fri, 14 Jun 2024 21:17:38 -0500 Subject: [PATCH] add options for postgresql init --- charts/postgres-cluster/Chart.yaml | 4 ++-- charts/postgres-cluster/templates/_bootstrap.tpl | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index 22e35f0..584f098 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 3.1.0 +version: 3.2.0 description: Chart for cloudnative-pg cluster keywords: - database @@ -10,4 +10,4 @@ sources: maintainers: - name: alexlebens icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4 -appVersion: v1.22.2 +appVersion: v1.23.1 diff --git a/charts/postgres-cluster/templates/_bootstrap.tpl b/charts/postgres-cluster/templates/_bootstrap.tpl index d3cf041..650ca27 100644 --- a/charts/postgres-cluster/templates/_bootstrap.tpl +++ b/charts/postgres-cluster/templates/_bootstrap.tpl @@ -20,6 +20,9 @@ bootstrap: {{- range .postInitApplicationSQL }} {{- printf "- %s" . | nindent 6 }} {{- end }} + {{- range .postInitSQL }} + {{- printf "- %s" . | nindent 6 }} + {{- end }} {{- end }} {{- else if eq .Values.mode "replica" }} initdb: @@ -32,7 +35,7 @@ bootstrap: {{- with .Values.replica.importDatabases }} {{- . | toYaml | nindent 8 }} {{- end }} - {{- end }} + {{- end }} {{- if eq .Values.replica.importType "monolith" }} roles: {{- with .Values.replica.importRoles }} @@ -43,7 +46,7 @@ bootstrap: postImportApplicationSQL: {{- with .Values.replica.postImportApplicationSQL }} {{- . | toYaml | nindent 8 }} - {{- end }} + {{- end }} {{- end }} source: externalCluster: "{{ include "cluster.name" . }}-cluster" @@ -51,7 +54,7 @@ externalClusters: - name: "{{ include "cluster.name" . }}-cluster" {{- with .Values.replica.externalCluster }} {{- . | toYaml | nindent 4 }} - {{- end }} + {{- end }} {{- else if eq .Values.mode "recovery" }} recovery: {{- with .Values.recovery.pitrTarget.time }}