feat(immich): BREAKING CHANGE - port to new common + multi-pod (#8801)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
remote: origin
|
||||
target-branch: master
|
||||
helm-extra-args: --timeout 120s
|
||||
helm-extra-args: --timeout 180s
|
||||
chart-yaml-schema: .github/chart_schema.yaml
|
||||
chart-dirs:
|
||||
- charts/incubator
|
||||
|
||||
@@ -3,15 +3,11 @@ appVersion: "1.49.0"
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.truecharts.org
|
||||
version: 11.1.2
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://deps.truecharts.org/
|
||||
version: 11.0.31
|
||||
version: 12.6.6
|
||||
- condition: redis.enabled
|
||||
name: redis
|
||||
repository: https://deps.truecharts.org
|
||||
version: 5.0.33
|
||||
version: 6.0.39
|
||||
description: High performance self-hosted photo and video backup solution.
|
||||
home: https://truecharts.org/charts/stable/immich
|
||||
icon: https://truecharts.org/img/hotlink-ok/chart-icons/immich.png
|
||||
@@ -26,9 +22,8 @@ name: immich
|
||||
sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/stable/immich
|
||||
- https://github.com/immich-app/immich
|
||||
version: 5.0.16
|
||||
version: 6.0.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
truecharts.org/SCALE-support: "true"
|
||||
truecharts.org/grade: U
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{- include "tc.v1.common.lib.chart.notes" $ -}}
|
||||
@@ -0,0 +1,95 @@
|
||||
{{- define "immich.config" -}}
|
||||
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
|
||||
{{- $secretName := printf "%s-secret" $fname -}}
|
||||
{{- $jwtSecret := randAlphaNum 32 -}}
|
||||
{{- $typesenseKey := randAlphaNum 32 -}}
|
||||
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}}
|
||||
{{- $jwtSecret = index .data "JWT_SECRET" | b64dec -}}
|
||||
{{- $typesenseKey = index .data "TYPESENSE_API_KEY" | b64dec -}}
|
||||
{{- end }}
|
||||
|
||||
configmap:
|
||||
web-config:
|
||||
enabled: true
|
||||
data:
|
||||
PORT: {{ .Values.service.web.ports.web.port | quote }}
|
||||
server-config:
|
||||
enabled: true
|
||||
data:
|
||||
{{/* User Defined */}}
|
||||
DISABLE_REVERSE_GEOCODING: {{ .Values.immich.disable_reverse_geocoding | quote }}
|
||||
REVERSE_GEOCODING_PRECISION: {{ .Values.immich.reverse_geocoding_precision | quote }}
|
||||
ENABLE_MAPBOX: {{ .Values.immich.mapbox_enable | quote }}
|
||||
SERVER_PORT: {{ .Values.service.server.ports.server.port | quote }}
|
||||
micro-config:
|
||||
enabled: true
|
||||
data:
|
||||
MICROSERVICES_PORT: {{ .Values.service.microservices.ports.microservices.port | quote }}
|
||||
REVERSE_GEOCODING_DUMP_DIRECTORY: {{ .Values.persistence.microcache.targetSelector.microservices.microservices.mountPath }}
|
||||
{{- if .Values.immich.enable_ml }}
|
||||
ml-config:
|
||||
enabled: true
|
||||
data:
|
||||
MACHINE_LEARNING_PORT: {{ .Values.service.machinelearning.ports.machinelearning.port | quote }}
|
||||
TRANSFORMERS_CACHE: {{ .Values.persistence.mlcache.targetSelector.machinelearning.machinelearning.mountPath }}
|
||||
{{- end }}
|
||||
common-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 }}
|
||||
{{- if .Values.immich.enable_ml }}
|
||||
IMMICH_MACHINE_LEARNING_URL: {{ printf "http://%v-machinelearning:%v" $fname .Values.service.machinelearning.ports.machinelearning.port }}
|
||||
{{- else }}
|
||||
IMMICH_MACHINE_LEARNING_URL: "false"
|
||||
{{- end }}
|
||||
TYPESENSE_ENABLED: {{ .Values.immich.enable_typesense | quote }}
|
||||
{{- if .Values.immich.enable_typesense }}
|
||||
TYPESENSE_URL: {{ printf "http://%v-typesense:%v" $fname .Values.service.typesense.ports.typesense.port }}
|
||||
TYPESENSE_PROTOCOL: http
|
||||
TYPESENSE_HOST: {{ printf "%v-typesense" $fname }}
|
||||
TYPESENSE_PORT: {{ .Values.service.typesense.ports.typesense.port | quote }}
|
||||
{{- end }}
|
||||
{{/*
|
||||
Its unclear where this URL is being used, but poking in their code, seems to be used internally?
|
||||
Its set to the value of IMMICH_SERVER_URL on their compose. If something doesnt work remotely,
|
||||
This is the place to start looking
|
||||
https://github.com/immich-app/immich/blob/b5d75e20167b92de12cc50a816da214779cb0807/web/src/api/api.ts#L55
|
||||
*/}}
|
||||
PUBLIC_IMMICH_SERVER_URL: {{ printf "http://%v-server:%v" $fname .Values.service.server.ports.server.port }}
|
||||
NODE_ENV: production
|
||||
{{/* User Defined */}}
|
||||
{{- with .Values.immich.public_login_page_message }}
|
||||
PUBLIC_LOGIN_PAGE_MESSAGE: {{ . }}
|
||||
{{- end }}
|
||||
LOG_LEVEL: {{ .Values.immich.log_level }}
|
||||
|
||||
secret:
|
||||
typesense-secret:
|
||||
enabled: true
|
||||
data:
|
||||
{{/* Secret Key */}}
|
||||
TYPESENSE_API_KEY: {{ $typesenseKey }}
|
||||
TYPESENSE_DATA_DIR: {{ .Values.persistence.typesense.targetSelector.typesense.typesense.mountPath }}
|
||||
secret:
|
||||
enabled: true
|
||||
data:
|
||||
{{/* Secret Key */}}
|
||||
JWT_SECRET: {{ $jwtSecret }}
|
||||
TYPESENSE_API_KEY: {{ $typesenseKey }}
|
||||
{{- with .Values.immich.mapbox_key }}
|
||||
MAPBOX_KEY: {{ . }}
|
||||
{{- end }}
|
||||
deps-secret:
|
||||
enabled: true
|
||||
data:
|
||||
DB_USERNAME: {{ .Values.cnpg.main.user }}
|
||||
DB_DATABASE_NAME: {{ .Values.cnpg.main.database }}
|
||||
DB_HOSTNAME: {{ .Values.cnpg.main.creds.host }}
|
||||
DB_PASSWORD: {{ .Values.cnpg.main.creds.password }}
|
||||
DB_PORT: "5432"
|
||||
REDIS_HOSTNAME: {{ .Values.redis.creds.plainhost }}
|
||||
REDIS_PASSWORD: {{ .Values.redis.creds.redisPassword }}
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_DBINDEX: "0"
|
||||
{{- end -}}
|
||||
@@ -1,51 +0,0 @@
|
||||
{{/* Define the configmap */}}
|
||||
{{- define "immich.config" -}}
|
||||
|
||||
{{- $serverConfigName := printf "%s-server-config" (include "tc.common.names.fullname" .) -}}
|
||||
{{- $commonConfigName := printf "%s-common-config" (include "tc.common.names.fullname" .) -}}
|
||||
{{- $proxyConfigName := printf "%s-proxy-config" (include "tc.common.names.fullname" .) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $serverConfigName }}
|
||||
labels:
|
||||
{{- include "tc.common.labels" . | nindent 4 }}
|
||||
data:
|
||||
DB_HOSTNAME: {{ printf "%v-%v" .Release.Name "postgresql" }}
|
||||
DB_USERNAME: {{ .Values.postgresql.postgresqlUsername }}
|
||||
DB_DATABASE_NAME: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
DB_PORT: "5432"
|
||||
REDIS_HOSTNAME: {{ printf "%v-%v" .Release.Name "redis" }}
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_DBINDEX: "0"
|
||||
{{/* User Defined */}}
|
||||
DISABLE_REVERSE_GEOCODING: {{ .Values.immich.disable_reverse_geocoding | quote }}
|
||||
REVERSE_GEOCODING_PRECISION: {{ .Values.immich.reverse_geocoding_precision | quote }}
|
||||
ENABLE_MAPBOX: {{ .Values.immich.mapbox_enable | quote }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $commonConfigName }}
|
||||
labels:
|
||||
{{- include "tc.common.labels" . | nindent 4 }}
|
||||
data:
|
||||
IMMICH_WEB_URL: http://localhost:3000
|
||||
IMMICH_SERVER_URL: http://localhost:3001
|
||||
IMMICH_MACHINE_LEARNING_URL: http://localhost:3003
|
||||
{{/*
|
||||
It's unclear where this URL is being used, but poking in their code, seems to be used internally?
|
||||
It's set to the value of IMMICH_SERVER_URL on their compose. If something doesn't work remotely,
|
||||
This is the place to start looking
|
||||
https://github.com/immich-app/immich/blob/b5d75e20167b92de12cc50a816da214779cb0807/web/src/api/api.ts#L55
|
||||
*/}}
|
||||
PUBLIC_IMMICH_SERVER_URL: http://localhost:3001
|
||||
NODE_ENV: production
|
||||
{{/* User Defined */}}
|
||||
{{- with .Values.immich.public_login_page_message }}
|
||||
PUBLIC_LOGIN_PAGE_MESSAGE: {{ . }}
|
||||
{{- end }}
|
||||
LOG_LEVEL: {{ .Values.immich.log_level }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,54 @@
|
||||
{{/* Define the machinelearning container */}}
|
||||
{{- define "immich.machinelearning" -}}
|
||||
enabled: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
initContainers:
|
||||
wait-server:
|
||||
{{- include "immich.wait" (dict "variable" "IMMICH_SERVER_URL" "path" "server-info/ping") | nindent 6 }}
|
||||
containers:
|
||||
machinelearning:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: mlImage
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: server-config
|
||||
- configMapRef:
|
||||
name: ml-config
|
||||
- secretRef:
|
||||
name: deps-secret
|
||||
- secretRef:
|
||||
name: secret
|
||||
probes:
|
||||
readiness:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /ping
|
||||
port: {{ .Values.service.machinelearning.ports.machinelearning.port }}
|
||||
liveness:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /ping
|
||||
port: {{ .Values.service.machinelearning.ports.machinelearning.port }}
|
||||
startup:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /ping
|
||||
port: {{ .Values.service.machinelearning.ports.machinelearning.port }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "immich.machinelearning.service" -}}
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
targetSelector: machinelearning
|
||||
ports:
|
||||
machinelearning:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: 10003
|
||||
protocol: http
|
||||
targetSelector: machinelearning
|
||||
{{- end -}}
|
||||
@@ -1,56 +1,64 @@
|
||||
{{/* Define the ml container */}}
|
||||
{{- define "immich.microservices" -}}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
|
||||
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
||||
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
|
||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- ./start-microservices.sh
|
||||
volumeMounts:
|
||||
- name: uploads
|
||||
mountPath: {{ .Values.persistence.uploads.mountPath }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-immich-secret'
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-common-config'
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-server-config'
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
ps -a | grep -v grep | grep -q microservices || exit 1
|
||||
initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
ps -a | grep -v grep | grep -q microservices || exit 1
|
||||
initialDelaySeconds: {{ .Values.probes.liveness.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.liveness.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.liveness.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.liveness.spec.failureThreshold }}
|
||||
startupProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
ps -a | grep -v grep | grep -q microservices || exit 1
|
||||
initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
|
||||
enabled: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
initContainers:
|
||||
wait-server:
|
||||
{{- include "immich.wait" (dict "variable" "IMMICH_SERVER_URL" "path" "server-info/ping") | nindent 6 }}
|
||||
containers:
|
||||
microservices:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: image
|
||||
command: /bin/sh
|
||||
args: ./start-microservices.sh
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: secret
|
||||
- secretRef:
|
||||
name: deps-secret
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: server-config
|
||||
- configMapRef:
|
||||
name: micro-config
|
||||
probes:
|
||||
readiness:
|
||||
enabled: true
|
||||
type: exec
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
ps -a | grep -v grep | grep -q microservices
|
||||
liveness:
|
||||
enabled: true
|
||||
type: exec
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
ps -a | grep -v grep | grep -q microservices
|
||||
startup:
|
||||
enabled: true
|
||||
type: exec
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
ps -a | grep -v grep | grep -q microservices
|
||||
{{- end -}}
|
||||
|
||||
{{- define "immich.microservices.service" -}}
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
targetSelector: microservices
|
||||
ports:
|
||||
microservices:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: 10004
|
||||
protocol: http
|
||||
targetSelector: microservices
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
{{/* Define the ml container */}}
|
||||
{{- define "immich.ml" -}}
|
||||
{{- if hasKey .Values "imageML" -}} {{/* For smooth upgrade, Remove later*/}}
|
||||
{{- $img := .Values.imageML -}}
|
||||
{{- $_ := set .Values "mlImage" (dict "repository" $img.repository "tag" $img.tag "pullPolicy" $img.pullPolicy) -}}
|
||||
{{- end }}
|
||||
image: {{ .Values.mlImage.repository }}:{{ .Values.mlImage.tag }}
|
||||
imagePullPolicy: {{ .Values.mlImage.pullPolicy }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
|
||||
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
||||
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
|
||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||
command:
|
||||
{{- if .Values.persistence.modelcache }}{{/* Only change command after upgrade */}}
|
||||
- python
|
||||
- src/main.py
|
||||
{{- else }}
|
||||
- /bin/sh
|
||||
- ./entrypoint.sh
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: uploads
|
||||
mountPath: {{ .Values.persistence.uploads.mountPath }}
|
||||
{{- if .Values.persistence.modelcache }}
|
||||
- name: modelcache
|
||||
mountPath: {{ .Values.persistence.modelcache.mountPath }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-common-config'
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-server-config'
|
||||
- secretRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-immich-secret'
|
||||
#readinessProbe:
|
||||
# exec:
|
||||
# command:
|
||||
# - /bin/sh
|
||||
# - -c
|
||||
# - |
|
||||
# grep -q main.js /proc/1/cmdline || exit 1
|
||||
# initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }}
|
||||
# timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }}
|
||||
# periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }}
|
||||
# failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }}
|
||||
#livenessProbe:
|
||||
# exec:
|
||||
# command:
|
||||
# - /bin/sh
|
||||
# - -c
|
||||
# - |
|
||||
# grep -q main.js /proc/1/cmdline || exit 1
|
||||
# initialDelaySeconds: {{ .Values.probes.liveness.spec.initialDelaySeconds }}
|
||||
# timeoutSeconds: {{ .Values.probes.liveness.spec.timeoutSeconds }}
|
||||
# periodSeconds: {{ .Values.probes.liveness.spec.periodSeconds }}
|
||||
# failureThreshold: {{ .Values.probes.liveness.spec.failureThreshold }}
|
||||
#startupProbe:
|
||||
# exec:
|
||||
# command:
|
||||
# - /bin/sh
|
||||
# - -c
|
||||
# - |
|
||||
# grep -q main.js /proc/1/cmdline || exit 1
|
||||
# initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
|
||||
# timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
|
||||
# periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
|
||||
# failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
|
||||
{{- end -}}
|
||||
@@ -1,47 +1,32 @@
|
||||
{{/* Define the proxy container */}}
|
||||
{{- define "immich.proxy" -}}
|
||||
{{- if hasKey .Values "imageProxy" -}} {{/* For smooth upgrade, Remove later */}}
|
||||
{{- $img := .Values.imageProxy -}}
|
||||
{{- $_ := set .Values "proxyImage" (dict "repository" $img.repository "tag" $img.tag "pullPolicy" $img.pullPolicy) -}}
|
||||
{{- end -}}
|
||||
{{- if not .Values.service.main.ports.main.targetPort -}} {{/* For smooth upgrade, Remove later */}}
|
||||
{{- $_ := set .Values.service.main.ports.main "targetPort" 8080 -}}
|
||||
{{- end }}
|
||||
image: {{ .Values.proxyImage.repository }}:{{ .Values.proxyImage.tag }}
|
||||
imagePullPolicy: {{ .Values.proxyImage.pullPolicy }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
|
||||
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
||||
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
|
||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-common-config'
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.main.ports.main.targetPort }}
|
||||
name: main
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/server-info/ping
|
||||
port: {{ .Values.service.main.ports.main.targetPort }}
|
||||
initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/server-info/ping
|
||||
port: {{ .Values.service.main.ports.main.targetPort }}
|
||||
initialDelaySeconds: {{ .Values.probes.liveness.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.liveness.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.liveness.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.liveness.spec.failureThreshold }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /api/server-info/ping
|
||||
port: {{ .Values.service.main.ports.main.targetPort }}
|
||||
initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
|
||||
enabled: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
initContainers:
|
||||
wait-server:
|
||||
{{- include "immich.wait" (dict "variable" "IMMICH_SERVER_URL" "path" "server-info/ping") | nindent 6 }}
|
||||
containers:
|
||||
proxy:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: proxyImage
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-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 -}}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{{/* Define the secret */}}
|
||||
{{- define "immich.secret" -}}
|
||||
|
||||
{{- $secretName := printf "%s-immich-secret" (include "tc.common.names.fullname" .) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
labels:
|
||||
{{- include "tc.common.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{/* Secret Key */}}
|
||||
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
|
||||
JWT_SECRET: {{ index .data "JWT_SECRET" }}
|
||||
{{- else }}
|
||||
JWT_SECRET: {{ randAlphaNum 32 | b64enc }}
|
||||
{{- end }}
|
||||
DB_PASSWORD: {{ .Values.postgresql.postgresqlPassword | trimAll "\"" | b64enc }}
|
||||
REDIS_PASSWORD: {{ .Values.redis.redisPassword | trimAll "\"" | b64enc }}
|
||||
{{- with .Values.immich.mapbox_key }}
|
||||
MAPBOX_KEY: {{ . | b64enc}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{- define "immich.server" -}}
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: image
|
||||
command: /bin/sh
|
||||
args: ./start-server.sh
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: server-config
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- secretRef:
|
||||
name: deps-secret
|
||||
- secretRef:
|
||||
name: secret
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /server-info/ping
|
||||
port: {{ .Values.service.server.ports.server.port }}
|
||||
readiness:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /server-info/ping
|
||||
port: {{ .Values.service.server.ports.server.port }}
|
||||
startup:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /server-info/ping
|
||||
port: {{ .Values.service.server.ports.server.port }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,46 @@
|
||||
{{/* Define the typesense container */}}
|
||||
{{- define "immich.typesense" -}}
|
||||
enabled: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
containers:
|
||||
typesense:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: typesenseImage
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: typesense-secret
|
||||
args:
|
||||
- --api-port
|
||||
- {{ .Values.service.typesense.ports.typesense.port | quote }}
|
||||
probes:
|
||||
readiness:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /health
|
||||
port: {{ .Values.service.typesense.ports.typesense.port }}
|
||||
liveness:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /health
|
||||
port: {{ .Values.service.typesense.ports.typesense.port }}
|
||||
startup:
|
||||
enabled: true
|
||||
type: http
|
||||
path: /health
|
||||
port: {{ .Values.service.typesense.ports.typesense.port }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "immich.typesense.service" -}}
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
targetSelector: typesense
|
||||
ports:
|
||||
typesense:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: 10002
|
||||
protocol: http
|
||||
targetSelector: typesense
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- define "immich.wait" -}}
|
||||
{{- $path := .path | default "" }}
|
||||
{{- $variable := .variable }}
|
||||
enabled: true
|
||||
type: init
|
||||
imageSelector: alpineImage
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
command:
|
||||
- /bin/ash
|
||||
- -c
|
||||
- |
|
||||
echo "Pinging [${{ $variable }}/{{ $path }}] until it is ready..."
|
||||
until wget --spider --quiet "${{ $variable }}/{{ $path }}"; do
|
||||
echo "Waiting for [${{ $variable }}/{{ $path }}] to be ready..."
|
||||
sleep 2
|
||||
done
|
||||
echo "URL [${{ $variable }}/{{ $path }}] is ready!"
|
||||
{{- end -}}
|
||||
@@ -1,44 +1,52 @@
|
||||
{{/* Define the web container */}}
|
||||
{{- define "immich.web" -}}
|
||||
{{- if hasKey .Values "imageWeb" -}} {{/* For smooth upgrade, Remove later */}}
|
||||
{{- $img := .Values.imageWeb -}}
|
||||
{{- $_ := set .Values "webImage" (dict "repository" $img.repository "tag" $img.tag "pullPolicy" $img.pullPolicy) -}}
|
||||
{{- end }}
|
||||
image: {{ .Values.webImage.repository }}:{{ .Values.webImage.tag }}
|
||||
imagePullPolicy: {{ .Values.webImage.pullPolicy }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
|
||||
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
||||
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
|
||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- ./entrypoint.sh
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-common-config'
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: {{ .Values.probes.liveness.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.liveness.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.liveness.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.liveness.spec.failureThreshold }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
|
||||
enabled: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
initContainers:
|
||||
wait-server:
|
||||
{{- include "immich.wait" (dict "variable" "IMMICH_SERVER_URL" "path" "server-info/ping") | nindent 6 }}
|
||||
containers:
|
||||
web:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: webImage
|
||||
command: /bin/sh
|
||||
args: ./entrypoint.sh
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: web-config
|
||||
- secretRef:
|
||||
name: deps-secret
|
||||
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 -}}
|
||||
|
||||
{{- define "immich.web.service" -}}
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
targetSelector: web
|
||||
ports:
|
||||
web:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: 10000
|
||||
protocol: http
|
||||
targetSelector: web
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,18 +1,36 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "tc.common.loader.init" . }}
|
||||
{{- include "tc.v1.common.loader.init" . }}
|
||||
|
||||
{{/* Render secret */}}
|
||||
{{- include "immich.secret" . }}
|
||||
{{- $_ := set .Values.workload "proxy" (include "immich.proxy" . | fromYaml) -}}
|
||||
|
||||
{{/* Render config */}}
|
||||
{{- include "immich.config" . }}
|
||||
|
||||
{{- $_ := set .Values.additionalContainers "proxy" (include "immich.proxy" . | fromYaml) -}}
|
||||
{{- $_ := set .Values.additionalContainers "web" (include "immich.web" . | fromYaml) -}}
|
||||
{{- if .Values.immich.enable_ml -}}
|
||||
{{- $_ := set .Values.additionalContainers "ml" (include "immich.ml" . | fromYaml) -}}
|
||||
{{- $_ := set .Values.workload.main.podSpec.containers "main" (include "immich.server" . | fromYaml) -}}
|
||||
{{- if .Values.immich.enable_typesense -}}
|
||||
{{- $_ := set .Values.workload.main.podSpec.initContainers "wait-typesense" (include "immich.wait" (dict "variable" "TYPESENSE_URL" "path" "health") | fromYaml) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $_ := set .Values.service "web" (include "immich.web.service" . | fromYaml) -}}
|
||||
{{- $_ := set .Values.workload "web" (include "immich.web" . | fromYaml) -}}
|
||||
|
||||
{{- $_ := set .Values.service "microservices" (include "immich.microservices.service" . | fromYaml) -}}
|
||||
{{- $_ := set .Values.workload "microservices" (include "immich.microservices" . | fromYaml) -}}
|
||||
|
||||
{{- if .Values.immich.enable_ml -}}
|
||||
{{- $_ := set .Values.service "machinelearning" (include "immich.machinelearning.service" . | fromYaml) -}}
|
||||
{{- $_ := set .Values.workload "machinelearning" (include "immich.machinelearning" . | fromYaml) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Values.immich.enable_typesense -}}
|
||||
{{- $_ := set .Values.service "typesense" (include "immich.typesense.service" . | fromYaml) -}}
|
||||
{{- $_ := set .Values.workload "typesense" (include "immich.typesense" . | fromYaml) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Render configuration for immich
|
||||
after services, as it has references
|
||||
*/}}
|
||||
{{- $config := include "immich.config" . | fromYaml -}}
|
||||
{{- if $config -}}
|
||||
{{- $_ := mustMergeOverwrite .Values $config -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set .Values.additionalContainers "microservices" (include "immich.microservices" . | fromYaml) -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "tc.common.loader.apply" . }}
|
||||
{{ include "tc.v1.common.loader.apply" . }}
|
||||
|
||||
@@ -1,37 +1,34 @@
|
||||
image:
|
||||
repository: tccr.io/truecharts/immich-server
|
||||
tag: 1.49.0@sha256:baa95afb670ee0e8d013a29eacff6ddc96751998854ba6882c242ce257ac8fbd
|
||||
tag: 1.55.1@sha256:c53b10695ed95b26a098e20788dcf0599b18f09d23dc54dd97717ed189370393
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
mlImage:
|
||||
repository: tccr.io/truecharts/immich-ml
|
||||
tag: 1.49.0@sha256:779e1d486d7ac5a1ed98b67b6f4a556e8e5baf334e4f0b9480315226384922c4
|
||||
tag: 1.55.1@sha256:5253b8bedf856669ca0d260190640fccbe7d19a3ff56af61b70b1e587a76d383
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
webImage:
|
||||
repository: tccr.io/truecharts/immich-web
|
||||
tag: 1.49.0@sha256:983a1f8b736ba337e7370fa19232febf0469c7748f670f15fb0ed4f35f9d88af
|
||||
tag: 1.55.1@sha256:9bd918a3c7e48e750867f16fc813913c5f00829fe0f187ec71168c789a3009db
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
proxyImage:
|
||||
repository: tccr.io/truecharts/immich-proxy
|
||||
tag: 1.49.0@sha256:08e467d09e6f4abf10e4ea93e0310e6bc323e4ea6b0a6c05fb128bb46ed38578
|
||||
tag: 1.55.1@sha256:794dd24898a12eb7ab91f6f7322743e0ef9fe1d224fbd62fb7ec1349246d55c4
|
||||
pullPolicy: IfNotPresent
|
||||
typesenseImage:
|
||||
repository: tccr.io/truecharts/immich-typesense
|
||||
tag: v0.24.1@sha256:1e46a13a98670c98b483e0cbbf66f05aa418146e7edf447446ae72f3bb8477ac
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
command:
|
||||
- /bin/sh
|
||||
- ./start-server.sh
|
||||
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
runAsNonRoot: false
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
container:
|
||||
readOnlyRootFilesystem: false
|
||||
runAsNonRoot: false
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
|
||||
immich:
|
||||
enable_ml: true
|
||||
enable_typesense: true
|
||||
public_login_page_message: Immich
|
||||
disable_reverse_geocoding: false
|
||||
reverse_geocoding_precision: 3
|
||||
@@ -40,54 +37,73 @@ immich:
|
||||
mapbox_enable: false
|
||||
mapbox_key: ""
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-server-config'
|
||||
- configMapRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-common-config'
|
||||
- secretRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-immich-secret'
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
path: /server-info/ping
|
||||
type: HTTP
|
||||
port: 3001
|
||||
readiness:
|
||||
path: /server-info/ping
|
||||
type: HTTP
|
||||
port: 3001
|
||||
startup:
|
||||
path: /server-info/ping
|
||||
type: HTTP
|
||||
port: 3001
|
||||
|
||||
service:
|
||||
main:
|
||||
# Main service targets the proxy
|
||||
targetSelector: proxy
|
||||
ports:
|
||||
main:
|
||||
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
|
||||
|
||||
persistence:
|
||||
uploads:
|
||||
enabled: true
|
||||
mountPath: /usr/src/app/upload
|
||||
modelcache:
|
||||
targetSelector:
|
||||
# Main pod/container is server
|
||||
main:
|
||||
main: {}
|
||||
microservices:
|
||||
microservices: {}
|
||||
machinelearning:
|
||||
machinelearning: {}
|
||||
mlcache:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
mountPath: /cache
|
||||
targetSelector:
|
||||
machinelearning:
|
||||
machinelearning:
|
||||
mountPath: /mlcache
|
||||
microcache:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
targetSelector:
|
||||
microservices:
|
||||
microservices:
|
||||
mountPath: /microcache
|
||||
typesense:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
targetSelector:
|
||||
typesense:
|
||||
typesense:
|
||||
mountPath: /typesensedata
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: dbcreds
|
||||
postgresqlUsername: immich
|
||||
postgresqlDatabase: immich
|
||||
cnpg:
|
||||
main:
|
||||
enabled: true
|
||||
user: immich
|
||||
database: immich
|
||||
|
||||
redis:
|
||||
enabled: true
|
||||
existingSecret: rediscreds
|
||||
redisUsername: default
|
||||
|
||||
portal:
|
||||
enabled: true
|
||||
open:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user