Compare commits

...

1 Commits

Author SHA1 Message Date
c36e4e371f reorganize values 2024-12-21 23:40:21 -06:00
3 changed files with 9 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: postgres-cluster name: postgres-cluster
version: 3.20.8 version: 3.20.9
description: Chart for cloudnative-pg cluster description: Chart for cloudnative-pg cluster
keywords: keywords:
- database - database

View File

@@ -2,7 +2,7 @@
bootstrap: bootstrap:
{{- if eq .Values.mode "standalone" }} {{- if eq .Values.mode "standalone" }}
initdb: initdb:
{{- with .Values.cluster.initdb }} {{- with .Values.bootstrap.initdb }}
{{- with (omit . "postInitApplicationSQL") }} {{- with (omit . "postInitApplicationSQL") }}
{{- . | toYaml | nindent 4 }} {{- . | toYaml | nindent 4 }}
{{- end }} {{- end }}
@@ -29,7 +29,7 @@ bootstrap:
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "app"; - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "app";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "app"; - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "app";
{{- end }} {{- end }}
{{- with .Values.cluster.initdb }} {{- with .Values.bootstrap.initdb }}
{{- range .postInitApplicationSQL }} {{- range .postInitApplicationSQL }}
{{- printf "- %s" . | nindent 6 }} {{- printf "- %s" . | nindent 6 }}
{{- end }} {{- end }}
@@ -37,11 +37,6 @@ bootstrap:
{{- end }} {{- end }}
{{- else if eq .Values.mode "replica" }} {{- else if eq .Values.mode "replica" }}
initdb: initdb:
{{- with .Values.cluster.initdb }}
{{- with (omit . "postInitApplicationSQL") }}
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- end }}
import: import:
type: {{ .Values.replica.importType }} type: {{ .Values.replica.importType }}
databases: databases:
@@ -66,6 +61,11 @@ bootstrap:
{{- end }} {{- end }}
source: source:
externalCluster: "{{ include "cluster.name" . }}-cluster" externalCluster: "{{ include "cluster.name" . }}-cluster"
{{- with .Values.bootstrap.initdb }}
{{- with (omit . "postInitApplicationSQL") }}
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- end }}
externalClusters: externalClusters:
- name: "{{ include "cluster.name" . }}-cluster" - name: "{{ include "cluster.name" . }}-cluster"
{{- with .Values.replica.externalCluster }} {{- with .Values.replica.externalCluster }}

View File

@@ -80,6 +80,7 @@ cluster:
hot_standby_feedback: "on" hot_standby_feedback: "on"
shared_preload_libraries: [] shared_preload_libraries: []
bootstrap:
# BootstrapInitDB is the configuration of the bootstrap process when initdb is used. # BootstrapInitDB is the configuration of the bootstrap process when initdb is used.
# See: https://cloudnative-pg.io/documentation/current/bootstrap/ # See: https://cloudnative-pg.io/documentation/current/bootstrap/
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb # See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb