From 6a8ae2f1f611b609c54b6ca9c44f1f4ed37d76dc Mon Sep 17 00:00:00 2001 From: Daniel Cosme Date: Tue, 5 May 2026 12:45:11 -0400 Subject: [PATCH] Update Immich Database --- infrastructure/hydra/postgres/immich-db.yaml | 7 +++++++ pkg/postgres/postgres.go | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/infrastructure/hydra/postgres/immich-db.yaml b/infrastructure/hydra/postgres/immich-db.yaml index 7b5a048..31a4c54 100644 --- a/infrastructure/hydra/postgres/immich-db.yaml +++ b/infrastructure/hydra/postgres/immich-db.yaml @@ -6,6 +6,13 @@ metadata: spec: cluster: name: cnpg-cluster + extensions: + - ensure: present + name: vectors + - ensure: present + name: cube + - ensure: present + name: earthdistance name: immich owner: immich status: {} diff --git a/pkg/postgres/postgres.go b/pkg/postgres/postgres.go index 673f766..7e96f7f 100644 --- a/pkg/postgres/postgres.go +++ b/pkg/postgres/postgres.go @@ -60,6 +60,26 @@ func ImmichDatabase() pg.Database { ClusterRef: core.LocalObjectReference{ Name: cluster_meta.Meta().Name, }, + Extensions: []pg.ExtensionSpec{ + { + DatabaseObjectSpec: pg.DatabaseObjectSpec{ + Name: "vectors", + Ensure: pg.EnsurePresent, + }, + }, + { + DatabaseObjectSpec: pg.DatabaseObjectSpec{ + Name: "cube", + Ensure: pg.EnsurePresent, + }, + }, + { + DatabaseObjectSpec: pg.DatabaseObjectSpec{ + Name: "earthdistance", + Ensure: pg.EnsurePresent, + }, + }, + }, } return kube_cnpg.NewDatabase(meta, spec) }