diff --git a/apps/immich/immich.postgres.yaml b/apps/immich/immich.postgres.yaml new file mode 100644 index 0000000..5c02c09 --- /dev/null +++ b/apps/immich/immich.postgres.yaml @@ -0,0 +1,39 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: immich-postgresql +spec: + instances: 1 + imageName: ghcr.io/tensorchord/cloudnative-vectorchord:16-0.3.0 + + bootstrap: + initdb: + owner: immich + database: immich + secret: + name: postgres-password + dataChecksums: true + postInitApplicationSQL: + - ALTER USER immich WITH SUPERUSER; + - CREATE EXTENSION IF NOT EXISTS vchord CASCADE; + - CREATE EXTENSION IF NOT EXISTS "cube"; + - CREATE EXTENSION IF NOT EXISTS "earthdistance"; + + postgresql: + shared_preload_libraries: + - "vchord.so" + + storage: + size: 5Gi + storageClass: nfs-client + + monitoring: + enablePodMonitor: true + + resources: + limits: + cpu: 2 + memory: 1024Mi + requests: + cpu: 50m + memory: 512Mi diff --git a/apps/immich/kustomization.yaml b/apps/immich/kustomization.yaml index 1f79518..ab27288 100644 --- a/apps/immich/kustomization.yaml +++ b/apps/immich/kustomization.yaml @@ -1,10 +1,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -resources: +resources: - namespace.yaml - ingress.yaml - pvc.yaml - - postgres.yaml + - immich.postgres.yaml - postgres.sealedsecret.yaml - servicemonitor.yaml @@ -22,9 +22,9 @@ helmCharts: images: - name: ghcr.io/immich-app/immich-machine-learning - newTag: v1.132.3 + newTag: v1.134.0 - name: ghcr.io/immich-app/immich-server - newTag: v1.132.3 + newTag: v1.134.0 patches: diff --git a/apps/immich/values.yaml b/apps/immich/values.yaml index fb0e255..096ae5f 100644 --- a/apps/immich/values.yaml +++ b/apps/immich/values.yaml @@ -6,8 +6,8 @@ env: REDIS_HOSTNAME: '{{ printf "%s-redis-master" .Release.Name }}' - DB_HOSTNAME: "immich-postgres-rw" - DB_USERNAME: + DB_HOSTNAME: "immich-postgresql-rw" + DB_USERNAME: valueFrom: secretKeyRef: name: postgres-password @@ -56,7 +56,7 @@ machine-learning: persistence: cache: enabled: true - size: 10Gi + size: 200Gi # Optional: Set this to pvc to avoid downloading the ML models every start. type: emptyDir accessMode: ReadWriteMany