Compare commits

...

1 Commits

Author SHA1 Message Date
668d50dfdb add conditional check for postinit 2024-07-04 22:52:02 -05:00
2 changed files with 3 additions and 1 deletions

View File

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

View File

@@ -7,6 +7,7 @@ bootstrap:
{{- . | toYaml | nindent 4 }} {{- . | toYaml | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (.Values.cluster.initdb) }}
postInitApplicationSQL: postInitApplicationSQL:
{{- if eq .Values.type "postgis" }} {{- if eq .Values.type "postgis" }}
- CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis;
@@ -21,6 +22,7 @@ bootstrap:
{{- printf "- %s" . | nindent 6 }} {{- printf "- %s" . | nindent 6 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}
{{- else if eq .Values.mode "replica" }} {{- else if eq .Values.mode "replica" }}
initdb: initdb:
import: import: