feat(immich): adapt to upstream changes (#15203)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes #10202
⚒️ Fixes #14324 

external library mount is removed, now "additional storage" is mounted
on both microservices and server

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ 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
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ 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._

---------

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Stavros Kois
2023-11-21 12:39:48 +02:00
committed by GitHub
parent 32bf612c2e
commit 54bc97d740
12 changed files with 52 additions and 182 deletions
+2 -2
View File
@@ -304,7 +304,7 @@
}, },
{ {
"matchDatasources": ["docker"], "matchDatasources": ["docker"],
"matchPackagePrefixes": ["tccr.io/truecharts/immich"], "matchPackagePrefixes": ["altran1502/immich"],
"groupName": "immich", "groupName": "immich",
}, },
{ {
@@ -369,7 +369,7 @@
}, },
{ {
"matchDatasources": ["docker"], "matchDatasources": ["docker"],
"matchPackagePrefixes": ["tccr.io/truecharts/authentik"], "matchPackagePrefixes": ["ghcr.io/goauthentik/"],
"groupName": "authentik", "groupName": "authentik",
}, },
{ {
+2 -2
View File
@@ -1,5 +1,5 @@
apiVersion: v2 apiVersion: v2
appVersion: "1.86.0" appVersion: "1.88.1"
dependencies: dependencies:
- name: common - name: common
repository: https://library-charts.truecharts.org repository: https://library-charts.truecharts.org
@@ -22,7 +22,7 @@ name: immich
sources: sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/immich - https://github.com/truecharts/charts/tree/master/charts/stable/immich
- https://github.com/immich-app/immich - https://github.com/immich-app/immich
version: 8.1.39 version: 9.0.0
annotations: annotations:
truecharts.org/category: media truecharts.org/category: media
truecharts.org/SCALE-support: "true" truecharts.org/SCALE-support: "true"
-8
View File
@@ -124,14 +124,6 @@ questions:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic}
- variable: externallibrary
label: App External Library Storage
description: Stores the External Library.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
# Include{persistenceList} # Include{persistenceList}
# Include{ingressRoot} # Include{ingressRoot}
+4 -18
View File
@@ -7,21 +7,13 @@
{{- end }} {{- end }}
configmap: configmap:
web-config:
enabled: true
data:
PORT: {{ .Values.service.web.ports.web.port | quote }}
NODE_ENV: production
IMMICH_SERVER_URL: {{ printf "http://%v-server:%v" $fname .Values.service.server.ports.server.port }}
PUBLIC_IMMICH_SERVER_URL: {{ printf "http://%v-server:%v" $fname .Values.service.server.ports.server.port }}
{{- with .Values.immich.public_login_page_message }}
PUBLIC_LOGIN_PAGE_MESSAGE: {{ . }}
{{- end }}
server-config: server-config:
enabled: true enabled: true
data: data:
SERVER_PORT: {{ .Values.service.server.ports.server.port | quote }} SERVER_PORT: {{ .Values.service.main.ports.main.port | quote }}
{{- with .Values.immich.public_login_page_message }}
PUBLIC_LOGIN_PAGE_MESSAGE: {{ . }}
{{- end }}
micro-config: micro-config:
enabled: true enabled: true
@@ -56,12 +48,6 @@ configmap:
TYPESENSE_PORT: {{ .Values.service.typesense.ports.typesense.port | quote }} TYPESENSE_PORT: {{ .Values.service.typesense.ports.typesense.port | quote }}
{{- end }} {{- end }}
proxy-config:
enabled: true
data:
IMMICH_WEB_URL: {{ printf "http://%v-web:%v" $fname .Values.service.web.ports.web.port }}
IMMICH_SERVER_URL: {{ printf "http://%v-server:%v" $fname .Values.service.server.ports.server.port }}
secret: secret:
typesense-secret: typesense-secret:
enabled: true enabled: true
@@ -1,7 +1,7 @@
{{/* Define the machinelearning container */}} {{/* Define the machinelearning container */}}
{{- define "immich.machinelearning" -}} {{- define "immich.machinelearning" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}} {{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $serverUrl := printf "http://%v-server:%v/server-info/ping" $fname .Values.service.server.ports.server.port }} {{- $serverUrl := printf "http://%v:%v/api/server-info/ping" $fname .Values.service.main.ports.main.port }}
enabled: true enabled: true
type: Deployment type: Deployment
podSpec: podSpec:
@@ -1,6 +1,6 @@
{{- define "immich.microservices" -}} {{- define "immich.microservices" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}} {{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $serverUrl := printf "http://%v-server:%v/server-info/ping" $fname .Values.service.server.ports.server.port }} {{- $serverUrl := printf "http://%v:%v/api/server-info/ping" $fname .Values.service.main.ports.main.port }}
enabled: true enabled: true
type: Deployment type: Deployment
podSpec: podSpec:
@@ -13,7 +13,10 @@ podSpec:
enabled: true enabled: true
primary: true primary: true
imageSelector: image imageSelector: image
args: start-microservices.sh command: /bin/sh
args:
- -c
- /usr/src/app/start-microservices.sh
securityContext: securityContext:
capabilities: capabilities:
disableS6Caps: true disableS6Caps: true
@@ -30,13 +33,13 @@ podSpec:
readiness: readiness:
enabled: true enabled: true
type: tcp type: tcp
port: '{{ .Values.service.microservices.ports.microservices.port }}' port: {{ .Values.service.microservices.ports.microservices.port }}
liveness: liveness:
enabled: true enabled: true
type: tcp type: tcp
port: '{{ .Values.service.microservices.ports.microservices.port }}' port: {{ .Values.service.microservices.ports.microservices.port }}
startup: startup:
enabled: true enabled: true
type: tcp type: tcp
port: '{{ .Values.service.microservices.ports.microservices.port }}' port: {{ .Values.service.microservices.ports.microservices.port }}
{{- end -}} {{- end -}}
-45
View File
@@ -1,45 +0,0 @@
{{- define "immich.proxy" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $serverUrl := printf "http://%v-server:%v/server-info/ping" $fname .Values.service.server.ports.server.port }}
{{- $webUrl := printf "http://%v-web:%v/robots.txt" $fname .Values.service.web.ports.web.port }}
enabled: true
type: Deployment
podSpec:
initContainers:
wait-server:
{{/* Wait for server */}}
{{- include "immich.wait" (dict "url" $serverUrl) | nindent 6 }}
{{/* Wait for web, otherwise nginx will fail to find host */}}
{{- include "immich.wait" (dict "url" $webUrl) | nindent 6 }}
containers:
proxy:
enabled: true
primary: true
imageSelector: proxyImage
securityContext:
capabilities:
disableS6Caps: true
add:
- CHOWN
- SETUID
- SETGID
envFrom:
- configMapRef:
name: proxy-config
probes:
readiness:
enabled: true
type: http
path: /api/server-info/ping
port: {{ .Values.service.main.ports.main.targetPort }}
liveness:
enabled: true
type: http
path: /api/server-info/ping
port: {{ .Values.service.main.ports.main.targetPort }}
startup:
enabled: true
type: http
path: /api/server-info/ping
port: {{ .Values.service.main.ports.main.targetPort }}
{{- end -}}
+10 -7
View File
@@ -2,7 +2,10 @@
enabled: true enabled: true
primary: true primary: true
imageSelector: image imageSelector: image
args: start-server.sh command: /bin/sh
args:
- -c
- /usr/src/app/start-server.sh
securityContext: securityContext:
capabilities: capabilities:
disableS6Caps: true disableS6Caps: true
@@ -19,16 +22,16 @@ probes:
liveness: liveness:
enabled: true enabled: true
type: http type: http
path: /server-info/ping path: /api/server-info/ping
port: {{ .Values.service.server.ports.server.port }} port: {{ .Values.service.main.ports.main.port }}
readiness: readiness:
enabled: true enabled: true
type: http type: http
path: /server-info/ping path: /api/server-info/ping
port: {{ .Values.service.server.ports.server.port }} port: {{ .Values.service.main.ports.main.port }}
startup: startup:
enabled: true enabled: true
type: http type: http
path: /server-info/ping path: /api/server-info/ping
port: {{ .Values.service.server.ports.server.port }} port: {{ .Values.service.main.ports.main.port }}
{{- end -}} {{- end -}}
+1 -1
View File
@@ -8,7 +8,7 @@ command:
- -c - -c
- | - |
echo "Pinging [{{ $url }}] until it is ready..." echo "Pinging [{{ $url }}] until it is ready..."
until wget --spider --quiet "{{ $url }}"; do until wget --spider --quiet --timeout=3 --tries 1 "{{ $url }}"; do
echo "Waiting for [{{ $url }}] to be ready..." echo "Waiting for [{{ $url }}] to be ready..."
sleep 2 sleep 2
done done
-42
View File
@@ -1,42 +0,0 @@
{{/* Define the web container */}}
{{- define "immich.web" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $serverUrl := printf "http://%v-server:%v/server-info/ping" $fname .Values.service.server.ports.server.port }}
enabled: true
type: Deployment
podSpec:
initContainers:
wait-server:
{{/* Wait for server */}}
{{- include "immich.wait" (dict "url" $serverUrl) | nindent 6 }}
containers:
web:
enabled: true
primary: true
imageSelector: webImage
securityContext:
capabilities:
disableS6Caps: true
add:
- SETUID
- SETGID
envFrom:
- configMapRef:
name: web-config
probes:
readiness:
enabled: true
type: http
path: /robots.txt
port: {{ .Values.service.web.ports.web.port }}
liveness:
enabled: true
type: http
path: /robots.txt
port: {{ .Values.service.web.ports.web.port }}
startup:
enabled: true
type: http
path: /robots.txt
port: {{ .Values.service.web.ports.web.port }}
{{- end -}}
+12 -6
View File
@@ -3,9 +3,6 @@
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}} {{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{/* Render Proxy Workload */}}
{{- $_ := set .Values.workload "proxy" (include "immich.proxy" . | fromYaml) -}}
{{- $_ := set .Values.workload.main.podSpec.containers "main" (include "immich.server" . | fromYaml) -}} {{- $_ := set .Values.workload.main.podSpec.containers "main" (include "immich.server" . | fromYaml) -}}
{{- if .Values.immich.enable_typesense -}} {{- if .Values.immich.enable_typesense -}}
{{/* Append init container to server, to make sure typesense is ready before starting */}} {{/* Append init container to server, to make sure typesense is ready before starting */}}
@@ -13,9 +10,6 @@
{{- $_ := set .Values.workload.main.podSpec.initContainers "wait-typesense" (include "immich.wait" (dict "url" $url) | fromYaml) -}} {{- $_ := set .Values.workload.main.podSpec.initContainers "wait-typesense" (include "immich.wait" (dict "url" $url) | fromYaml) -}}
{{- end -}} {{- end -}}
{{/* Render Web Workload */}}
{{- $_ := set .Values.workload "web" (include "immich.web" . | fromYaml) -}}
{{/* Render Microservices Workload */}} {{/* Render Microservices Workload */}}
{{- $_ := set .Values.workload "microservices" (include "immich.microservices" . | fromYaml) -}} {{- $_ := set .Values.workload "microservices" (include "immich.microservices" . | fromYaml) -}}
@@ -54,5 +48,17 @@
{{- $_ := mustMergeOverwrite .Values $config -}} {{- $_ := mustMergeOverwrite .Values $config -}}
{{- end -}} {{- end -}}
{{- range $idx, $persistence := .Values.persistenceList -}}
{{- $_ := set $persistence "targetSelector" (dict
"main" (dict "main" dict)
"microservices" (dict "microservices" dict)
) -}}
{{- end -}}
{{- $envList := .Values.workload.main.podSpec.containers.main.envList -}}
{{- if $envList -}}
{{- $_ := set .Values.workload.microservices.podSpec.containers.microservices "envList" $envList -}}
{{- end -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }} {{ include "tc.v1.common.loader.apply" . }}
+12 -45
View File
@@ -1,67 +1,38 @@
image: image:
repository: altran1502/immich-server repository: altran1502/immich-server
tag: v1.86.0@sha256:b04b0cb5db7f954d1d7a9c9792f9feedcaaabed03b2f251ef7c6a8169be10086 tag: v1.88.1@sha256:87dd30e8938ec894d1a05b5ce436fd12d432f4f76992f85495b84a2f9d2b2583
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
mlImage: mlImage:
repository: altran1502/immich-machine-learning repository: altran1502/immich-machine-learning
tag: v1.86.0@sha256:4f745b74a3d534fde87ba8ae3c7de97c1504596188d6da3fd38a2777acacda8a tag: v1.88.1@sha256:68391160d4fca56382a3eb8eff969f1728fed019bd8d737cab5d64950512d333
pullPolicy: IfNotPresent
webImage:
repository: altran1502/immich-web
tag: v1.86.0@sha256:f2e806d4cbe7e443de0c004e7d6bc585b00e1d187913591fdc1fca944143026d
pullPolicy: IfNotPresent
proxyImage:
repository: altran1502/immich-proxy
tag: v1.86.0@sha256:96a557932b457fba8eb38d1d0d476f2e07fa8971d8a926886ebc543a6b35f012
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
typesenseImage: typesenseImage:
repository: typesense/typesense repository: typesense/typesense
tag: 0.25.1@sha256:3724f68156097114d07790e1c8bfaaca13b12eaecd602776d30d9933029064c7 tag: 0.25.1@sha256:3724f68156097114d07790e1c8bfaaca13b12eaecd602776d30d9933029064c7
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
securityContext: securityContext:
container: container:
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
runAsNonRoot: false runAsNonRoot: false
runAsUser: 0 runAsUser: 0
runAsGroup: 0 runAsGroup: 0
immich: immich:
enable_ml: true enable_ml: true
enable_typesense: true enable_typesense: true
public_login_page_message: Immich public_login_page_message: Immich
log_level: log log_level: log
service: service:
main: main:
# Main service targets the proxy # Main service targets the server
targetSelector: proxy targetSelector: main
ports: ports:
main: main:
port: 10323 port: 10323
protocol: http protocol: http
targetSelector: proxy
targetPort: 8080
server:
enabled: true
type: ClusterIP
# Server is the main container
targetSelector: main
ports:
server:
enabled: true
primary: true
port: 10001
protocol: http
targetSelector: main targetSelector: main
web:
enabled: true
type: ClusterIP
targetSelector: web
ports:
web:
enabled: true
primary: true
port: 10000
protocol: http
targetSelector: web
microservices: microservices:
enabled: true enabled: true
type: ClusterIP type: ClusterIP
@@ -95,6 +66,7 @@ service:
port: 10002 port: 10002
protocol: http protocol: http
targetSelector: typesense targetSelector: typesense
persistence: persistence:
mlcache: mlcache:
enabled: true enabled: true
@@ -162,24 +134,19 @@ persistence:
main: {} main: {}
microservices: microservices:
microservices: {} microservices: {}
externallibrary:
enabled: true
mountPath: /media
targetSelector:
# Main pod/container is server
main:
main: {}
microservices:
microservices: {}
cnpg: cnpg:
main: main:
enabled: true enabled: true
user: immich user: immich
database: immich database: immich
redis: redis:
enabled: true enabled: true
redisUsername: default redisUsername: default
portal: portal:
open: open:
enabled: true enabled: true
updated: true updated: true