diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index 3272cf1..72613e4 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 3.10.0 +version: 3.11.0 description: Chart for cloudnative-pg cluster keywords: - database diff --git a/charts/postgres-cluster/templates/_bootstrap.tpl b/charts/postgres-cluster/templates/_bootstrap.tpl index ccc06bd..6378a54 100644 --- a/charts/postgres-cluster/templates/_bootstrap.tpl +++ b/charts/postgres-cluster/templates/_bootstrap.tpl @@ -7,7 +7,7 @@ bootstrap: {{- . | toYaml | nindent 4 }} {{- end }} {{- end }} - {{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (.Values.cluster.initdb.postInitApplicationSQL) }} + {{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (eq .Values.type "tensorchord") (.Values.cluster.initdb.postInitApplicationSQL) }} postInitApplicationSQL: {{- if eq .Values.type "postgis" }} - CREATE EXTENSION IF NOT EXISTS postgis; @@ -16,13 +16,18 @@ bootstrap: - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; {{- else if eq .Values.type "timescaledb" }} - CREATE EXTENSION IF NOT EXISTS timescaledb; + {{- else if eq .Values.type "tensorchord" }} + - CREATE EXTENSION IF NOT EXISTS "vector"; + - CREATE EXTENSION IF NOT EXISTS "vectors"; + - CREATE EXTENSION IF NOT EXISTS "cube"; + - CREATE EXTENSION IF NOT EXISTS "earthdistance"; {{- end }} {{- with .Values.cluster.initdb }} {{- range .postInitApplicationSQL }} {{- printf "- %s" . | nindent 6 }} {{- end }} {{- end }} - {{- end }} + {{- end }} {{- else if eq .Values.mode "replica" }} initdb: import: diff --git a/charts/postgres-cluster/templates/cluster.yaml b/charts/postgres-cluster/templates/cluster.yaml index 408c461..e6c7641 100644 --- a/charts/postgres-cluster/templates/cluster.yaml +++ b/charts/postgres-cluster/templates/cluster.yaml @@ -43,6 +43,14 @@ spec: shared_preload_libraries: - timescaledb {{- end }} + {{- if eq .Values.type "tensorchord" }} + shared_preload_libraries: + - vectors.so + {{- end }} + {{- with .Values.cluster.postgresql.shared_preload_libraries }} + shared_preload_libraries: + {{- toYaml . | nindent 6 }} + {{ end }} {{- with .Values.cluster.postgresql.parameters }} parameters: {{- toYaml . | nindent 6 }} diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index b6ade83..5d1a26a 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -6,6 +6,7 @@ nameOverride: "" # * `postgresql` # * `postgis` # * `timescaledb` +# * `tensorchord` type: postgresql ### @@ -77,6 +78,7 @@ cluster: shared_buffers: 128MB max_slot_wal_keep_size: 2000MB hot_standby_feedback: "on" + shared_preload_libraries: [] # BootstrapInitDB is the configuration of the bootstrap process when initdb is used. # See: https://cloudnative-pg.io/documentation/current/bootstrap/