feat(immich): readd immich (#19137)

**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  #18737 

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ 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:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 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
- [ ] ⬆️ 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 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: Kjeld Schouten <info@kjeldschouten.nl>
This commit is contained in:
Kjeld Schouten
2024-03-12 09:07:06 +01:00
committed by GitHub
parent 9fd8c0ee83
commit 4cb46c53ec
16 changed files with 1047 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
# docs folder
/docs
# icon
icon.png

View File

@@ -0,0 +1,251 @@
# Changelog
## [immich-2.0.0](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-2.0.0) (2022-11-10)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Major Change to GUI
- update helm general non-major ([#4342](https://github.com/truecharts/charts/issues/4342))
- update helm general non-major ([#4349](https://github.com/truecharts/charts/issues/4349))
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
### Fix
- change container config label
## [immich-1.0.9](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-1.0.9) (2022-11-08)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- update helm general non-major ([#4342](https://github.com/truecharts/charts/issues/4342))
- update helm general non-major ([#4349](https://github.com/truecharts/charts/issues/4349))
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
## [immich-1.0.8](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-1.0.8) (2022-11-08)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- update helm general non-major ([#4342](https://github.com/truecharts/charts/issues/4342))
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
## [immich-1.0.8](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-1.0.8) (2022-11-08)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- update helm general non-major ([#4342](https://github.com/truecharts/charts/issues/4342))
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
## [immich-1.0.8](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-1.0.8) (2022-11-08)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- update helm general non-major ([#4342](https://github.com/truecharts/charts/issues/4342))
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
## [immich-1.0.7](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-1.0.7) (2022-11-07)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
## [immich-1.0.7](https://github.com/truecharts/charts/compare/immich-1.0.6...immich-1.0.7) (2022-11-06)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4329](https://github.com/truecharts/charts/issues/4329))
## [immich-1.0.6](https://github.com/truecharts/charts/compare/immich-1.0.5...immich-1.0.6) (2022-11-06)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4317](https://github.com/truecharts/charts/issues/4317))
## [immich-1.0.5](https://github.com/truecharts/charts/compare/immich-1.0.4...immich-1.0.5) (2022-11-05)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4308](https://github.com/truecharts/charts/issues/4308))
## [immich-1.0.4](https://github.com/truecharts/charts/compare/immich-1.0.3...immich-1.0.4) (2022-11-02)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4261](https://github.com/truecharts/charts/issues/4261))
## [immich-1.0.3](https://github.com/truecharts/charts/compare/immich-1.0.2...immich-1.0.3) (2022-10-25)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major
## [immich-1.0.2](https://github.com/truecharts/charts/compare/immich-1.0.1...immich-1.0.2) (2022-10-25)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4182](https://github.com/truecharts/charts/issues/4182))
## [immich-1.0.1](https://github.com/truecharts/charts/compare/immich-1.0.0...immich-1.0.1) (2022-10-19)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4122](https://github.com/truecharts/charts/issues/4122))
- allow to disable machine-learning container ([#4132](https://github.com/truecharts/charts/issues/4132))
## [immich-1.0.0](https://github.com/truecharts/charts/compare/immich-0.0.6...immich-1.0.0) (2022-10-14)
### Feat
- Move to Stable ([#4094](https://github.com/truecharts/charts/issues/4094))
## [immich-0.0.6](https://github.com/truecharts/charts/compare/immich-0.0.5...immich-0.0.6) (2022-10-12)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major ([#4071](https://github.com/truecharts/charts/issues/4071))
## [immich-0.0.5](https://github.com/truecharts/charts/compare/immich-0.0.4...immich-0.0.5) (2022-10-07)
### Chore
- Auto-update chart README [skip ci]
- Auto-update chart README [skip ci]
- update helm general non-major
## [immich-0.0.5](https://github.com/truecharts/charts/compare/immich-0.0.4...immich-0.0.5) (2022-10-07)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major
## [immich-0.0.4](https://github.com/truecharts/charts/compare/immich-0.0.3...immich-0.0.4) (2022-10-05)
### Chore
- Auto-update chart README [skip ci]
- update helm general non-major
## [immich-0.0.3](https://github.com/truecharts/charts/compare/immich-0.0.2...immich-0.0.3) (2022-10-03)
### Chore
- Auto-update chart README [skip ci]
- split addons in smaller templates ([#3979](https://github.com/truecharts/charts/issues/3979))
- move to stable ([#3978](https://github.com/truecharts/charts/issues/3978))
### Fix
- actually spin up microservices contaienr ([#3998](https://github.com/truecharts/charts/issues/3998))
## [immich-0.0.2](https://github.com/truecharts/charts/compare/immich-0.0.1...immich-0.0.2) (2022-09-29)
### Chore
- Auto-update chart README [skip ci]
### Fix
- add hostAliases due to upstream hardcoded urls ([#3956](https://github.com/truecharts/charts/issues/3956))
## [immich-0.0.1]immich-0.0.1 (2022-09-28)
### Feat
- add immich ([#3942](https://github.com/truecharts/charts/issues/3942))

View File

@@ -0,0 +1,43 @@
kubeVersion: ">=1.24.0-0"
apiVersion: v2
name: immich
version: 13.0.0
appVersion: 1.98.2
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
deprecated: false
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/immich
- https://hub.docker.com/r/altran1502/immich-machine-learning
- https://github.com/immich-app/immich
maintainers:
- name: TrueCharts
email: info@truecharts.org
url: https://truecharts.org
keywords:
- photos
dependencies:
- name: common
version: 20.0.8
repository: oci://tccr.io/truecharts
condition: ""
alias: ""
tags: []
import-values: []
- name: redis
version: 13.0.0
repository: oci://tccr.io/truecharts
condition: redis.enabled
alias: ""
tags: []
import-values: []
annotations:
max_scale_version: 23.10.2
min_scale_version: 23.10.0
truecharts.org/SCALE-support: "true"
truecharts.org/category: media
truecharts.org/max_helm_version: "3.13"
truecharts.org/min_helm_version: "3.12"
truecharts.org/train: stable
type: application

View File

@@ -0,0 +1,106 @@
Business Source License 1.1
Parameters
Licensor: The TrueCharts Project, it's owner and it's contributors
Licensed Work: The TrueCharts "Blocky" Helm Chart
Additional Use Grant: You may use the licensed work in production, as long
as it is directly sourced from a TrueCharts provided
official repository, catalog or source. You may also make private
modification to the directly sourced licenced work,
when used in production.
The following cases are, due to their nature, also
defined as 'production use' and explicitly prohibited:
- Bundling, including or displaying the licensed work
with(in) another work intended for production use,
with the apparent intend of facilitating and/or
promoting production use by third parties in
violation of this license.
Change Date: 2050-01-01
Change License: 3-clause BSD license
For information about alternative licensing arrangements for the Software,
please contact: legal@truecharts.org
Notice
The Business Source License (this document, or the “License”) is not an Open
Source license. However, the Licensed Work will eventually be made available
under an Open Source License, as stated in this License.
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
“Business Source License” is a trademark of MariaDB Corporation Ab.
-----------------------------------------------------------------------------
Business Source License 1.1
Terms
The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.
Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.
If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.
All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.
You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.
Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.
This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
MariaDB hereby grants you permission to use this Licenses text to license
your works, and to refer to it using the trademark “Business Source License”,
as long as you comply with the Covenants of Licensor below.
Covenants of Licensor
In consideration of the right to use this Licenses text and the “Business
Source License” name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:
1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where “compatible” means that software provided under the Change License can
be included in a program with software provided under GPL Version 2.0 or a
later version. Licensor may specify additional Change Licenses without
limitation.
2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text “None”.
3. To specify a Change Date.
4. Not to modify this License in any other way.

View File

@@ -0,0 +1,27 @@
# README
## General Info
TrueCharts can be installed as both *normal* Helm Charts or as Apps on TrueNAS SCALE.
However only installations using the TrueNAS SCALE Apps system are supported.
For more information about this App, please check the docs on the TrueCharts [website](https://truecharts.org/charts/stable/immich)
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
## Support
- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/manual/SCALE/guides/scale-intro).
- See the [Website](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/charts/issues/new/choose)
---
## Sponsor TrueCharts
TrueCharts can only exist due to the incredible effort of our staff.
Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can!
*All Rights Reserved - The TrueCharts Project*

View File

@@ -0,0 +1,26 @@
# Install Notes
## Warning
Immich is essentially pre-alpha, it works but its releases are extremely unrelyable while not complying to semver at all.
This means that Immich might randomly and unexpectedly stop working or loose data.
That goes for every way you deploy it: There be dragons.
You're warned. have fun!
##
This chart now requires the following hcarts to be installed before you can install:
- cloudnative-pg
- prometheus-operator
These are in the operators train.
To enable this in TrueNAS scale
- Apps
- Manage Catalogs.
- Edit the TrueCharts Catalog (under the three dots).
- Enable the operators train under 'Perferred Trains'.
- Install the required charts in Available Applications

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -0,0 +1,171 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
# Include{containerBasic}
# Include{containerAdvanced}
- variable: immich
group: App Configuration
label: Immich Configuration
schema:
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:
type: string
default: log
enum:
- value: log
description: log
- value: simple
description: simple (Switch to log ASAP)
- value: warn
description: warn
- value: error
description: error
- value: verbose
description: verbose
- value: debug
description: debug
- variable: enable_ml
label: Enable Machine Learning Container
schema:
type: boolean
default: true
- variable: enable_typesense
label: Enable Typesense Container
schema:
type: boolean
default: true
# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
- variable: main
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: Main Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 10323
required: true
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: library
label: App Library Storage
description: Stores the Application Uploads.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: uploads
label: App Uploads Storage
description: Temporary location for WebUI and mobile app uploads for images/videos that still need to be processed and eventually imported into the library storage.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: thumbs
label: App Thumbnails Storage
description: Stores the Application Thumbnails.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: profile
label: App Profiles Storage
description: Stores the Application Profiles.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: video
label: App Encoded Video Storage
description: Stores the Encoded Videos.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: Main Ingress
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressAdvanced}
# Include{ingressList}
# Include{securityContextRoot}
- variable: runAsUser
label: "runAsUser"
description: "The UserID of the user running the application"
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID of the user running the application"
schema:
type: int
default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
type: int
default: 568
# Include{resources}
# Include{postgresql}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}

View File

@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}

View File

@@ -0,0 +1,54 @@
{{- define "immich.config" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
configmap:
server-config:
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
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:
NODE_ENV: production
MACHINE_LEARNING_PORT: {{ .Values.service.machinelearning.ports.machinelearning.port | quote }}
MACHINE_LEARNING_CACHE_FOLDER: {{ .Values.persistence.mlcache.targetSelector.machinelearning.machinelearning.mountPath }}
TRANSFORMERS_CACHE: {{ .Values.persistence.mlcache.targetSelector.machinelearning.machinelearning.mountPath }}
{{- end }}
{{/* Server and Microservices */}}
common-config:
enabled: true
data:
NODE_ENV: production
LOG_LEVEL: {{ .Values.immich.log_level }}
IMMICH_MACHINE_LEARNING_ENABLED: {{ .Values.immich.enable_ml | quote }}
{{- if .Values.immich.enable_ml }}
IMMICH_MACHINE_LEARNING_URL: {{ printf "http://%v-machinelearning:%v" $fname .Values.service.machinelearning.ports.machinelearning.port }}
{{- end }}
secret:
{{/* Server and Microservices */}}
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 -}}

View File

@@ -0,0 +1,43 @@
{{/* Define the machinelearning container */}}
{{- define "immich.machinelearning" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $serverUrl := printf "http://%v:%v/api/server-info/ping" $fname .Values.service.main.ports.main.port }}
{{- $img := "mlImage" -}}
{{- with .Values.immich.mlImageType -}}
{{- $img = . -}}
{{- end }}
enabled: true
type: Deployment
podSpec:
initContainers:
wait-server:
{{/* Wait for server */}}
{{- include "immich.wait" (dict "url" $serverUrl) | nindent 6 }}
containers:
machinelearning:
enabled: true
primary: true
imageSelector: "{{ $img }}"
securityContext:
capabilities:
disableS6Caps: true
envFrom:
- configMapRef:
name: ml-config
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 -}}

View File

@@ -0,0 +1,43 @@
{{- define "immich.microservices" -}}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $serverUrl := printf "http://%v:%v/api/server-info/ping" $fname .Values.service.main.ports.main.port }}
enabled: true
type: Deployment
podSpec:
initContainers:
wait-server:
{{/* Wait for server */}}
{{- include "immich.wait" (dict "url" $serverUrl) | nindent 6 }}
containers:
microservices:
enabled: true
primary: true
imageSelector: image
command: /bin/sh
args:
- -c
- /usr/src/app/start-microservices.sh
securityContext:
capabilities:
disableS6Caps: true
envFrom:
- secretRef:
name: deps-secret
- configMapRef:
name: common-config
- configMapRef:
name: micro-config
probes:
readiness:
enabled: true
type: tcp
port: {{ .Values.service.microservices.ports.microservices.port }}
liveness:
enabled: true
type: tcp
port: {{ .Values.service.microservices.ports.microservices.port }}
startup:
enabled: true
type: tcp
port: {{ .Values.service.microservices.ports.microservices.port }}
{{- end -}}

View File

@@ -0,0 +1,35 @@
{{- define "immich.server" -}}
enabled: true
primary: true
imageSelector: image
command: /bin/sh
args:
- -c
- /usr/src/app/start-server.sh
securityContext:
capabilities:
disableS6Caps: true
envFrom:
- configMapRef:
name: server-config
- configMapRef:
name: common-config
- secretRef:
name: deps-secret
probes:
liveness:
enabled: true
type: http
path: /api/server-info/ping
port: {{ .Values.service.main.ports.main.port }}
readiness:
enabled: true
type: http
path: /api/server-info/ping
port: {{ .Values.service.main.ports.main.port }}
startup:
enabled: true
type: http
path: /api/server-info/ping
port: {{ .Values.service.main.ports.main.port }}
{{- end -}}

View File

@@ -0,0 +1,16 @@
{{- define "immich.wait" -}}
{{- $url := .url }}
enabled: true
type: init
imageSelector: alpineImage
command:
- /bin/ash
- -c
- |
echo "Pinging [{{ $url }}] until it is ready..."
until wget --spider --quiet --timeout=3 --tries 1 "{{ $url }}"; do
echo "Waiting for [{{ $url }}] to be ready..."
sleep 2
done
echo "URL [{{ $url }}] is ready!"
{{- end -}}

View File

@@ -0,0 +1,49 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . }}
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
{{- $_ := set .Values.workload.main.podSpec.containers "main" (include "immich.server" . | fromYaml) -}}
{{/* Render Microservices Workload */}}
{{- $_ := set .Values.workload "microservices" (include "immich.microservices" . | fromYaml) -}}
{{- if .Values.immich.enable_ml -}}
{{/* Enable Machine Learning Service */}}
{{- $_ := set .Values.service.machinelearning "enabled" true -}}
{{/* Render Machine Learning Workload */}}
{{- $_ := set .Values.workload "machinelearning" (include "immich.machinelearning" . | fromYaml) -}}
{{- else -}}
{{/* Disable Machine Learning Service */}}
{{- $_ := 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
*/}}
{{- $config := include "immich.config" . | fromYaml -}}
{{- if $config -}}
{{- $_ := mustMergeOverwrite .Values $config -}}
{{- 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 */}}
{{ include "tc.v1.common.loader.apply" . }}

View File

@@ -0,0 +1,152 @@
image:
repository: altran1502/immich-server
tag: v1.98.2
pullPolicy: IfNotPresent
mlImage:
repository: altran1502/immich-machine-learning
pullPolicy: IfNotPresent
tag: v1.98.2
mlCudaImage:
repository: altran1502/immich-machine-learning
pullPolicy: IfNotPresent
tag: v1.98.2-cuda
mlOpenvinoImage:
repository: altran1502/immich-machine-learning
pullPolicy: IfNotPresent
tag: v1.98.2-openvino
securityContext:
container:
readOnlyRootFilesystem: false
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
immich:
enable_ml: true
mlImageType: mlImage
public_login_page_message: Immich
log_level: log
service:
main:
# Main service targets the server
targetSelector: main
ports:
main:
port: 10323
protocol: http
targetSelector: main
microservices:
enabled: true
type: ClusterIP
targetSelector: microservices
ports:
microservices:
enabled: true
primary: true
port: 10004
protocol: http
targetSelector: microservices
machinelearning:
enabled: true
type: ClusterIP
targetSelector: machinelearning
ports:
machinelearning:
enabled: true
primary: true
port: 10003
protocol: http
targetSelector: machinelearning
persistence:
mlcache:
enabled: true
type: emptyDir
targetSelector:
machinelearning:
machinelearning:
mountPath: /mlcache
microcache:
enabled: true
type: emptyDir
targetSelector:
microservices:
microservices:
mountPath: /microcache
library:
enabled: true
mountPath: /usr/src/app/upload/library
targetSelector:
# Main pod/container is server
main:
main: {}
microservices:
microservices: {}
uploads:
enabled: true
mountPath: /usr/src/app/upload/upload
targetSelector:
# Main pod/container is server
main:
main: {}
microservices:
microservices: {}
thumbs:
enabled: true
mountPath: /usr/src/app/upload/thumbs
targetSelector:
# Main pod/container is server
main:
main: {}
microservices:
microservices: {}
profile:
enabled: true
mountPath: /usr/src/app/upload/profile
targetSelector:
# Main pod/container is server
main:
main: {}
microservices:
microservices: {}
video:
enabled: true
mountPath: /usr/src/app/upload/encoded-video
targetSelector:
# Main pod/container is server
main:
main: {}
microservices:
microservices: {}
cnpg:
main:
enabled: true
user: immich
database: immich
type: vectors
cluster:
initdb:
postInitApplicationSQL:
- CREATE EXTENSION IF NOT EXISTS cube;
- CREATE EXTENSION IF NOT EXISTS earthdistance;
- CREATE SCHEMA IF NOT EXISTS vectors;
- ALTER DATABASE immich SET search_path TO "immich", public, vectors;
- SET search_path TO "immich", public, vectors;
- GRANT SELECT ON TABLE pg_vector_index_stat TO PUBLIC;
- ALTER SCHEMA vectors OWNER TO immich;
redis:
enabled: true
redisUsername: default
portal:
open:
enabled: true