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) }