diff --git a/immich/cnpg.yaml b/immich/cnpg.yaml new file mode 100644 index 0000000..1f84737 --- /dev/null +++ b/immich/cnpg.yaml @@ -0,0 +1,27 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: immich-database + namespace: immich +spec: + instances: 1 + storage: + size: 1Gi + imageName: ghcr.io/cloudnative-pg/postgresql:18.6-standard-trixie + bootstrap: + database: immich + ownder: immich + secret: immich-postgres-user + postgresql: + shared_preload_libraries: + - "vchord.so" + # This extension is loaded via the Database CRD at cloudnative-pg-database.yaml + extensions: + - name: vchord + image: + reference: ghcr.io/tensorchord/vchord-scratch:pg18-v1.1.1 + dynamic_library_path: + - /usr/lib/postgresql/18/lib + extension_control_path: + - /usr/share/postgresql/18/ + diff --git a/immich/kustomization.yaml b/immich/kustomization.yaml new file mode 100644 index 0000000..6bd738b --- /dev/null +++ b/immich/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ns.yaml +- pvc.yaml +- cnpg.yaml + diff --git a/immich/ns.yaml b/immich/ns.yaml new file mode 100644 index 0000000..c796392 --- /dev/null +++ b/immich/ns.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: immich diff --git a/immich/pvc.yaml b/immich/pvc.yaml new file mode 100644 index 0000000..ba62ed2 --- /dev/null +++ b/immich/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: immich-pvc +spec: + storageClassName: nfs-client + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1000Gi diff --git a/immich/values.yaml b/immich/values.yaml new file mode 100644 index 0000000..bf181ba --- /dev/null +++ b/immich/values.yaml @@ -0,0 +1,19 @@ +controllers: + main: + containers: + main: + env: + DB_HOSTNAME: immich-database + DB_USERNAME: immich + DB_DATABASE_NAME: immich + DB_PASSWORD: + valueFrom: + secretKeyRef: + name: immich-postgres-user + key: password +immich: + persistence: + library: + existingClaim: immich-pvc +valkey: + enabled: true