mirror of
https://github.com/truenas/charts.git
synced 2026-04-24 10:30:37 +08:00
immich - fix upgrade strategy and GPU definition (#2151)
* immich - fix upgrade strategy * add gpu to both ML and microservices pods
This commit is contained in:
@@ -4,7 +4,7 @@ description: Immich is a self-hosted photo and video backup solution directly fr
|
||||
annotations:
|
||||
title: Immich
|
||||
type: application
|
||||
version: 3.0.8
|
||||
version: 3.0.9
|
||||
apiVersion: v2
|
||||
appVersion: 1.94.1
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -86,4 +86,17 @@ configmap:
|
||||
MACHINE_LEARNING_CACHE_FOLDER: /mlcache
|
||||
TRANSFORMERS_CACHE: /mlcache
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.immichGPU }}
|
||||
scaleGPU:
|
||||
{{- range $key, $value := . }}
|
||||
- gpu:
|
||||
{{ $key }}: {{ $value }}
|
||||
targetSelector:
|
||||
microservices:
|
||||
- microservices
|
||||
machinelearning:
|
||||
- machinelearning
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -45,15 +45,4 @@ workload:
|
||||
{{- include "ix.v1.common.app.redisWait" (dict "name" "redis-wait"
|
||||
"secretName" "redis-creds") | nindent 8 }}
|
||||
{{- include "immich.wait.init" (dict "url" $url) | indent 8 }}
|
||||
|
||||
{{- with .Values.immichGPU }}
|
||||
scaleGPU:
|
||||
{{- range $key, $value := . }}
|
||||
- gpu:
|
||||
{{ $key }}: {{ $value }}
|
||||
targetSelector:
|
||||
microservices:
|
||||
- microservices
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"filename": "values.yaml",
|
||||
"keys": [
|
||||
"pgvectorImage",
|
||||
"image",
|
||||
"mlImage",
|
||||
"mlCudaImage",
|
||||
|
||||
@@ -8,10 +8,22 @@ from catalog_update.upgrade_strategy import semantic_versioning
|
||||
|
||||
RE_STABLE_VERSION_BASE = r'\d+\.\d+\.\d+'
|
||||
ENUMS = {
|
||||
'default': {
|
||||
'image': {
|
||||
'RE_STABLE_VERSION': re.compile(rf'v{RE_STABLE_VERSION_BASE}'),
|
||||
'STRIP_TEXT': 'v'
|
||||
},
|
||||
'mlImage': {
|
||||
'RE_STABLE_VERSION': re.compile(rf'v{RE_STABLE_VERSION_BASE}'),
|
||||
'STRIP_TEXT': 'v'
|
||||
},
|
||||
'mlCudaImage': {
|
||||
'RE_STABLE_VERSION': re.compile(rf'v{RE_STABLE_VERSION_BASE}-cuda'),
|
||||
'STRIP_TEXT': 'v'
|
||||
},
|
||||
'mlOpenvinoImage': {
|
||||
'RE_STABLE_VERSION': re.compile(rf'v{RE_STABLE_VERSION_BASE}-openvino'),
|
||||
'STRIP_TEXT': 'v'
|
||||
},
|
||||
'pgvectorImage': {
|
||||
'RE_STABLE_VERSION': re.compile(rf'pg15-v{RE_STABLE_VERSION_BASE}'),
|
||||
'STRIP_TEXT': 'pg15-v'
|
||||
@@ -20,7 +32,7 @@ ENUMS = {
|
||||
|
||||
|
||||
def strip_text(key, STRIP_TEXT):
|
||||
key = key.replace('cuda', '').replace('openvino', '')
|
||||
key = key.replace('-cuda', '').replace('-openvino', '')
|
||||
return key.strip(STRIP_TEXT)
|
||||
|
||||
|
||||
@@ -32,10 +44,8 @@ def newer_mapping(image_tags):
|
||||
}
|
||||
|
||||
for key in image_tags.keys():
|
||||
STRIP_TEXT = ENUMS[key].get('STRIP_TEXT', None) \
|
||||
if key in ENUMS else ENUMS.get('default', None).get('STRIP_TEXT', None)
|
||||
RE_STABLE_VERSION = ENUMS[key].get('RE_STABLE_VERSION') \
|
||||
if key in ENUMS else ENUMS.get('default', None).get('RE_STABLE_VERSION', None)
|
||||
STRIP_TEXT = ENUMS[key].get('STRIP_TEXT', None)
|
||||
RE_STABLE_VERSION = ENUMS[key].get('RE_STABLE_VERSION')
|
||||
|
||||
if (STRIP_TEXT is None) or (RE_STABLE_VERSION is None):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user