From 2f64695618c27a02df4a3b8181330e922c6a7a6b Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:31:31 +0300 Subject: [PATCH] NAS-122858 / 23.10 / Add support for additional library mounts in immich (#1339) * Add support for additional library mounts in immich * Update library/ix-dev/community/immich/questions.yaml * bump --- library/ix-dev/community/immich/Chart.yaml | 2 +- .../community/immich/ci/extra-values.yaml | 25 +++++++++++++++++++ .../ix-dev/community/immich/questions.yaml | 21 ++++++++++++++++ .../immich/templates/_persistence.tpl | 15 ++++++++++- library/ix-dev/community/immich/values.yaml | 1 + 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 library/ix-dev/community/immich/ci/extra-values.yaml diff --git a/library/ix-dev/community/immich/Chart.yaml b/library/ix-dev/community/immich/Chart.yaml index 5f9c1b5788..cf7800c521 100644 --- a/library/ix-dev/community/immich/Chart.yaml +++ b/library/ix-dev/community/immich/Chart.yaml @@ -3,7 +3,7 @@ description: Immich annotations: title: Immich type: application -version: 1.0.1 +version: 1.0.2 apiVersion: v2 appVersion: '1.66.1' kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/community/immich/ci/extra-values.yaml b/library/ix-dev/community/immich/ci/extra-values.yaml new file mode 100644 index 0000000000..1d79415c15 --- /dev/null +++ b/library/ix-dev/community/immich/ci/extra-values.yaml @@ -0,0 +1,25 @@ +immichStorage: + uploads: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/uploads + library: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/library + thumbs: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/thumbs + profile: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/profile + video: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/video + additionalLibraries: + - hostPath: /mnt/{{ .Release.Name }}/additionalLibrary1 + - hostPath: /mnt/{{ .Release.Name }}/additionalLibrary2 + pgData: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/pgData + pgBackup: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/pgBackup diff --git a/library/ix-dev/community/immich/questions.yaml b/library/ix-dev/community/immich/questions.yaml index 30ed92a274..2621b5229b 100644 --- a/library/ix-dev/community/immich/questions.yaml +++ b/library/ix-dev/community/immich/questions.yaml @@ -291,6 +291,27 @@ questions: show_if: [["type", "=", "hostPath"]] immutable: true required: true + - variable: additionalLibraries + label: Additional Libraries + description: | + Additional libraries for Immich.
+ Internal mountPath will be the same as your hostPath
+ https://immich.app/docs/features/read-only-gallery + schema: + type: list + default: [] + items: + - variable: storageEntry + label: Storage Entry + schema: + type: dict + attrs: + - variable: hostPath + label: Host Path + description: The host path to use for storage. + schema: + type: hostpath + required: true - variable: pgData label: Immich Postgres Data Storage description: The path to store Immich Postgres Data. diff --git a/library/ix-dev/community/immich/templates/_persistence.tpl b/library/ix-dev/community/immich/templates/_persistence.tpl index e9c2bff8df..39e198fa40 100644 --- a/library/ix-dev/community/immich/templates/_persistence.tpl +++ b/library/ix-dev/community/immich/templates/_persistence.tpl @@ -61,7 +61,20 @@ persistence: microservices: microservices: mountPath: /usr/src/app/upload/encoded-video - + {{- range $idx, $storage := .Values.immichStorage.additionalLibraries }} + {{ printf "immich-%v" (int $idx) }}: + enabled: true + type: hostPath + hostPath: {{ $storage.hostPath | default "" }} + # Host path and mount path MUST be the same + targetSelector: + server: + server: + mountPath: {{ $storage.hostPath }} + microservices: + microservices: + mountPath: {{ $storage.hostPath }} + {{- end }} {{/* Caches */}} microcache: enabled: true diff --git a/library/ix-dev/community/immich/values.yaml b/library/ix-dev/community/immich/values.yaml index 4787fa1058..b7f3bfadef 100644 --- a/library/ix-dev/community/immich/values.yaml +++ b/library/ix-dev/community/immich/values.yaml @@ -62,6 +62,7 @@ immichStorage: video: type: ixVolume datasetName: video + additionalLibraries: [] pgData: type: ixVolume datasetName: pgData