From 28ccbb0984c5cc2d4f3dc4ab2329472d620cea75 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:15:09 +0300 Subject: [PATCH] immich: allow passing gpu to serevr (#2646) * immich: allow passing gpu to serevr * bump --- library/ix-dev/community/immich/Chart.yaml | 2 +- .../ix-dev/community/immich/questions.yaml | 22 ++++++++++++++++++- .../immich/templates/_configuration.tpl | 6 +++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/library/ix-dev/community/immich/Chart.yaml b/library/ix-dev/community/immich/Chart.yaml index 3758eb5b6c..7e95a2e789 100644 --- a/library/ix-dev/community/immich/Chart.yaml +++ b/library/ix-dev/community/immich/Chart.yaml @@ -4,7 +4,7 @@ description: Immich is a self-hosted photo and video backup solution directly fr annotations: title: Immich type: application -version: 4.0.6 +version: 4.0.7 apiVersion: v2 appVersion: 1.108.0 kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/community/immich/questions.yaml b/library/ix-dev/community/immich/questions.yaml index b94ba56be3..517c9a5df7 100644 --- a/library/ix-dev/community/immich/questions.yaml +++ b/library/ix-dev/community/immich/questions.yaml @@ -843,7 +843,7 @@ questions: schema: type: string max_length: 12 - valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$' + valid_chars: "^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$" valid_chars_error: | Valid Memory limit formats are
- Suffixed with E/P/T/G/M/K - eg. 1G
@@ -861,3 +861,23 @@ questions: $ref: - "definitions/gpuConfiguration" attrs: [] + - variable: immichGPUContainers + group: Resources Configuration + label: GPU Containers + description: Select which containers should use GPU. + schema: + type: dict + # This will only hide it if there are no GPUs available + # but will still show if there are 0 GPUs selected. + show_if: [["immichGPU", "!=", {}]] + attrs: + - variable: server + label: Enable GPU for Server + schema: + type: boolean + default: true + - variable: machinelearning + label: Enable GPU for Machine Learning + schema: + type: boolean + default: true diff --git a/library/ix-dev/community/immich/templates/_configuration.tpl b/library/ix-dev/community/immich/templates/_configuration.tpl index ce46d0692d..067a9b8636 100644 --- a/library/ix-dev/community/immich/templates/_configuration.tpl +++ b/library/ix-dev/community/immich/templates/_configuration.tpl @@ -88,8 +88,14 @@ scaleGPU: - gpu: {{ $key }}: {{ $value }} targetSelector: + {{- if $.Values.immichGPUContainers.server }} + server: + - server + {{- end }} + {{- if $.Values.immichGPUContainers.machinelearning }} machinelearning: - machinelearning + {{- end }} {{- end -}} {{- end -}} {{- end -}}