From acfce6645eb82e2c3797a9441abce9173c0a0b04 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Sun, 25 Oct 2026 17:46:03 +0100 Subject: [PATCH 1/2] velero: skip PVCs in Longhorn's no-backup group --- velero/skip-emptydir-policy.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/velero/skip-emptydir-policy.yaml b/velero/skip-emptydir-policy.yaml index 74b094b..efcf12d 100644 --- a/velero/skip-emptydir-policy.yaml +++ b/velero/skip-emptydir-policy.yaml @@ -1,6 +1,8 @@ # Volume policy for the backup schedules. emptyDir volumes hold nothing # worth keeping, and backing them up fails when the pod is gone before its # volume is read, as happens with Velero's own repository maintenance jobs. +# PVCs in Longhorn's no-backup group (caches, such as immich's ML models) +# are skipped too. apiVersion: v1 kind: ConfigMap metadata: @@ -14,3 +16,8 @@ data: - emptyDir action: type: skip + - conditions: + pvcLabels: + recurring-job-group.longhorn.io/no-backup: enabled + action: + type: skip From 6cba1a936331142465afe6bbdcca0548773102aa Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Sun, 25 Oct 2026 17:46:03 +0100 Subject: [PATCH 2/2] immich: the optimized ML models, cached on a volume --- immich/helm-immich.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/immich/helm-immich.yaml b/immich/helm-immich.yaml index e60080f..a9ab83a 100644 --- a/immich/helm-immich.yaml +++ b/immich/helm-immich.yaml @@ -127,6 +127,9 @@ spec: TRANSFORMERS_CACHE: /cache HF_XET_CACHE: /cache/huggingface-xet MPLCONFIGDIR: /cache/matplotlib-config + # The optimized models of v3.3.0: faster, less memory, + # and the same results, so no jobs to run again. + MACHINE_LEARNING_MODEL_REVISION: v2 # Trust store without the compromised eMudhra # intermediates; requests would otherwise use certifi. SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt @@ -139,11 +142,19 @@ spec: globalMounts: - path: /etc/ssl/certs readOnly: true + # The models and their one-off preparation, kept across restarts. + # Downloaded again if lost, so no backups: the no-backup group + # keeps it out of Longhorn's default one (backup-daily), and + # Velero skips that label too (velero/skip-emptydir-policy.yaml). cache: enabled: true - # Optional: to avoid downloading the ML models every start, use - # a persistentVolumeClaim with size, accessMode and storageClass - type: emptyDir + type: persistentVolumeClaim + storageClass: longhorn + accessMode: ReadWriteOnce + size: 10Gi + labels: + recurring-job.longhorn.io/source: enabled + recurring-job-group.longhorn.io/no-backup: enabled destination: server: https://kubernetes.default.svc