immich added

This commit is contained in:
2025-10-27 09:44:37 +01:00
commit e6f3536e9e
37 changed files with 2670 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: immich-db
namespace: immich
labels:
app: immich-db
velero.io/exclude-from-backup: 'true'
spec:
# https://github.com/tensorchord/cloudnative-vectorchord/pkgs/container/cloudnative-vectorchord
imageName: ghcr.io/tensorchord/cloudnative-vectorchord:16-0.4.3
instances: 2
resources:
limits:
memory: 4Gi
requests:
memory: 2Gi
cpu: 20m
# longhorn: because of easier size restriction
storage:
size: 4Gi
storageClass: longhorn
managed:
roles:
- name: app
# we make it as superuser otherwise it can happen that immich fails to start because if is checking / creating the extensions in postgres db
# it can be done manually but this makes life much easier
superuser: true
login: true
postgresql:
parameters:
shared_buffers: 2GB
archive_timeout: 60min
shared_preload_libraries:
- 'vchord.so'
enableAlterSystem: true
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: immich-db
monitoring:
enablePodMonitor: true

View File

View File

@@ -0,0 +1,17 @@
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: immich-db-daily
namespace: immich
labels:
app: immich-db
spec:
cluster:
name: immich-db
schedule: '0 0 2 * * *'
backupOwnerReference: self
immediate: true
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io