From a94983f816bd8c17c1b2375e069a4c7093600e0f Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Wed, 21 Jan 2026 00:16:07 +0100 Subject: [PATCH] Add cnpg to immich --- immich/postgresql-cluster.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 immich/postgresql-cluster.yaml diff --git a/immich/postgresql-cluster.yaml b/immich/postgresql-cluster.yaml new file mode 100644 index 0000000..60e4e83 --- /dev/null +++ b/immich/postgresql-cluster.yaml @@ -0,0 +1,27 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: immich-postgres + namespace: immich +spec: + instances: 1 + + imageName: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0 + + postgresql: + shared_preload_libraries: + - "vchord.so" + - "vectors.so" + + bootstrap: + initdb: + database: immich + owner: immich + postInitSQL: + - CREATE EXTENSION IF NOT EXISTS vectors; + - CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE; + - CREATE EXTENSION IF NOT EXISTS vchord CASCADE; + + storage: + size: 20Gi + storageClass: longhorn