Upgrade Immich to v2.1.0

Move to using kustomize'd helm charts to deploy it
Update the new version of the helm chart, which has very different
values structure
Move database into the db namespace
Upgrade the db to include vectorchord
Upgrade CNPG to now include barman cloud natively
Migrate databases to Barman Cloud plugin, completely
Eliminate yet another shell script step in applying my k8s config
This commit is contained in:
Greg Hellings
2025-10-19 21:48:30 -05:00
parent 0de9d5e002
commit 89460c4e21
16 changed files with 1388 additions and 189 deletions
-74
View File
@@ -1,74 +0,0 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
namespace: db
name: pgvector
spec:
imageName: "ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0"
instances: 1
storage:
size: 40Gi
primaryUpdateStrategy: unsupervised
postgresql:
shared_preload_libraries:
- "vectors.so"
bootstrap:
initdb:
database: immich
owner: immich
secret:
name: postgres-user-immich
dataChecksums: true
postInitApplicationSQL:
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
- SET search_path TO "$user", public, vectors;
- CREATE EXTENSION IF NOT EXISTS "vectors";
- CREATE EXTENSION IF NOT EXISTS "cube";
- CREATE EXTENSION IF NOT EXISTS "earthdistance";
- ALTER SCHEMA vectors OWNER TO "immich";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "immich";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "immich";
managed:
roles:
- name: immich
ensure: present
comment: Immich DB user
login: true
superuser: false
passwordSecret:
name: postgres-user-immich
backup:
retentionPolicy: "30d"
barmanObjectStore:
destinationPath: "s3://k3sbackup/pgvector"
endpointURL: "http://s3.thehellings.lan:9000/"
s3Credentials:
accessKeyId:
name: k3sbackup
key: username
secretAccessKey:
name: k3sbackup
key: password
wal:
compression: gzip
---
apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
namespace: db
name: database-immich
spec:
name: immich
owner: immich
cluster:
name: pgvector
extensions:
- name: vectors
ensure: present
- name: vectorchord
ensure: present
- name: cube
ensure: present
- name: earthdistance
ensure: present