From 87bf586568fac7dd09e095c795b26f09629aef8a Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sat, 23 Mar 2024 10:04:54 +0200 Subject: [PATCH] chore(immich): cleanup and fix gpu allocation (#19408) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/stable/immich/Chart.yaml | 2 +- charts/stable/immich/questions.yaml | 6 ------ charts/stable/immich/templates/_config.tpl | 3 --- charts/stable/immich/templates/_machinelearning.tpl | 2 +- charts/stable/immich/templates/_server.tpl | 2 ++ charts/stable/immich/templates/_wait.tpl | 2 ++ charts/stable/immich/templates/common.yaml | 7 ------- charts/stable/immich/values.yaml | 1 - 8 files changed, 6 insertions(+), 19 deletions(-) diff --git a/charts/stable/immich/Chart.yaml b/charts/stable/immich/Chart.yaml index c58a018f04e..0801a2928b9 100644 --- a/charts/stable/immich/Chart.yaml +++ b/charts/stable/immich/Chart.yaml @@ -41,4 +41,4 @@ sources: - https://hub.docker.com/r/altran1502/immich-machine-learning - https://hub.docker.com/r/altran1502/immich-server type: application -version: 14.2.0 +version: 14.2.1 diff --git a/charts/stable/immich/questions.yaml b/charts/stable/immich/questions.yaml index cf1ca0f0a48..49b31a37ac3 100644 --- a/charts/stable/immich/questions.yaml +++ b/charts/stable/immich/questions.yaml @@ -20,12 +20,6 @@ questions: additional_attrs: true type: dict attrs: - - variable: public_login_page_message - label: Public Login Page Message - description: Custom message on the login page, should be written in HTML form. - schema: - type: string - default: "" - variable: log_level label: Log Level schema: diff --git a/charts/stable/immich/templates/_config.tpl b/charts/stable/immich/templates/_config.tpl index 673bec22fa3..28411dc1495 100644 --- a/charts/stable/immich/templates/_config.tpl +++ b/charts/stable/immich/templates/_config.tpl @@ -6,9 +6,6 @@ configmap: enabled: true data: SERVER_PORT: {{ .Values.service.main.ports.main.port | quote }} - {{- with .Values.immich.public_login_page_message }} - PUBLIC_LOGIN_PAGE_MESSAGE: {{ . }} - {{- end }} micro-config: enabled: true diff --git a/charts/stable/immich/templates/_machinelearning.tpl b/charts/stable/immich/templates/_machinelearning.tpl index df49da9dd5d..f3068e46c3a 100644 --- a/charts/stable/immich/templates/_machinelearning.tpl +++ b/charts/stable/immich/templates/_machinelearning.tpl @@ -17,7 +17,7 @@ podSpec: machinelearning: enabled: true primary: true - imageSelector: "{{ $img }}" + imageSelector: {{ $img }} securityContext: capabilities: disableS6Caps: true diff --git a/charts/stable/immich/templates/_server.tpl b/charts/stable/immich/templates/_server.tpl index 9327aef0ecc..89a112ccd31 100644 --- a/charts/stable/immich/templates/_server.tpl +++ b/charts/stable/immich/templates/_server.tpl @@ -2,6 +2,8 @@ enabled: true primary: true imageSelector: image +resources: + excludeExtra: true command: /bin/sh args: - -c diff --git a/charts/stable/immich/templates/_wait.tpl b/charts/stable/immich/templates/_wait.tpl index 8a1743d601e..4704bed3d3f 100644 --- a/charts/stable/immich/templates/_wait.tpl +++ b/charts/stable/immich/templates/_wait.tpl @@ -3,6 +3,8 @@ enabled: true type: init imageSelector: alpineImage +resources: + excludeExtra: true command: - /bin/ash - -c diff --git a/charts/stable/immich/templates/common.yaml b/charts/stable/immich/templates/common.yaml index 8e75b84283a..1e61e9ec1e4 100644 --- a/charts/stable/immich/templates/common.yaml +++ b/charts/stable/immich/templates/common.yaml @@ -18,13 +18,6 @@ {{- $_ := set .Values.service.machinelearning "enabled" false -}} {{- end -}} -{{/* Set targetselector for GPU to microservices */}} -{{- range $gpuEntry := .Values.scaleGPU }} - {{- if $gpuEntry.gpu -}} - {{- $_ := set $gpuEntry "targetSelector" (dict "microservices" (list "microservices")) -}} - {{- end -}} -{{- end -}} - {{/* Render configuration for immich after services, as it has references */}} diff --git a/charts/stable/immich/values.yaml b/charts/stable/immich/values.yaml index 14101a1f8fe..3f09022a941 100644 --- a/charts/stable/immich/values.yaml +++ b/charts/stable/immich/values.yaml @@ -28,7 +28,6 @@ securityContext: immich: enable_ml: true mlImageType: mlImage - public_login_page_message: Immich log_level: log service: