diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index 65fa0b35f0f..45674e3a5ac 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: common description: A library chart for iX Official Catalog type: library -version: 1.2.4 +version: 1.2.5 appVersion: v1 annotations: title: Common Library Chart diff --git a/library/common/templates/app_functions/_postgres.tpl b/library/common/templates/app_functions/_postgres.tpl index 44f861a5fba..571447512e9 100644 --- a/library/common/templates/app_functions/_postgres.tpl +++ b/library/common/templates/app_functions/_postgres.tpl @@ -13,10 +13,12 @@ backupChownMode (optional): Whether to chown the backup directory or */}} {{- define "ix.v1.common.app.postgres" -}} {{- $name := .name | default "postgres" -}} + {{- $imageSelector := .imageSelector | default "postgresImage" -}} {{- $secretName := (required "Postgres - Secret Name is required" .secretName) -}} {{- $backupPath := .backupPath | default "/postgres_backup" -}} {{- $backupChownMode := .backupChownMode | default "check" -}} {{- $ixChartContext := .ixChartContext -}} + {{- $preUpgradeTasks := .preUpgradeTasks | default list -}} {{- $resources := (required "Postgres - Resources are required" .resources) }} {{ $name }}: @@ -27,7 +29,7 @@ backupChownMode (optional): Whether to chown the backup directory or {{ $name }}: enabled: true primary: true - imageSelector: postgresImage + imageSelector: {{ $imageSelector }} securityContext: runAsUser: 999 runAsGroup: 999 @@ -99,7 +101,7 @@ postgresbackup: postgresbackup: enabled: true primary: true - imageSelector: postgresImage + imageSelector: {{ $imageSelector }} securityContext: runAsUser: 999 runAsGroup: 999 @@ -126,6 +128,9 @@ postgresbackup: echo "Creating backup of ${POSTGRES_DB} database" pg_dump --dbname=${POSTGRES_URL} --file {{ $backupPath }}/${POSTGRES_DB}_$(date +%Y-%m-%d_%H-%M-%S).sql || echo "Failed to create backup" echo "Backup finished" + {{- range $task := $preUpgradeTasks }} + {{ $task }} + {{- end }} initContainers: {{- include "ix.v1.common.app.permissions" (dict diff --git a/library/ix-dev/community/immich/Chart.lock b/library/ix-dev/community/immich/Chart.lock index 5a38612b4ff..5f77fd61d90 100644 --- a/library/ix-dev/community/immich/Chart.lock +++ b/library/ix-dev/community/immich/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: file://../../../common - version: 1.2.4 -digest: sha256:47ebfd41bc2ac33ab6989e7bd4d1d3aea662365fffa8b525a24cc56a2a35c174 -generated: "2023-12-15T18:16:31.686869306+02:00" + version: 1.2.5 +digest: sha256:39d574b4c1141e20a63afd62dffdde37efe60a89e00e38111b35a53b34103bb1 +generated: "2023-12-18T15:33:51.655773088+02:00" diff --git a/library/ix-dev/community/immich/Chart.yaml b/library/ix-dev/community/immich/Chart.yaml index 7a3cbd7f539..ae1b2a27696 100644 --- a/library/ix-dev/community/immich/Chart.yaml +++ b/library/ix-dev/community/immich/Chart.yaml @@ -4,9 +4,9 @@ description: Immich is a self-hosted photo and video backup solution directly fr annotations: title: Immich type: application -version: 2.0.6 +version: 3.0.0 apiVersion: v2 -appVersion: 1.90.2 +appVersion: 1.91.3 kubeVersion: '>=1.16.0-0' maintainers: - name: truenas @@ -15,7 +15,7 @@ maintainers: dependencies: - name: common repository: file://../../../common - version: 1.2.4 + version: 1.2.5 home: https://immich.app icon: https://media.sys.truenas.net/apps/immich/icons/icon.svg sources: diff --git a/library/ix-dev/community/immich/charts/common-1.2.4.tgz b/library/ix-dev/community/immich/charts/common-1.2.4.tgz deleted file mode 100644 index fad13da218b..00000000000 Binary files a/library/ix-dev/community/immich/charts/common-1.2.4.tgz and /dev/null differ diff --git a/library/ix-dev/community/immich/charts/common-1.2.5.tgz b/library/ix-dev/community/immich/charts/common-1.2.5.tgz new file mode 100644 index 00000000000..cfc6d8e8aab Binary files /dev/null and b/library/ix-dev/community/immich/charts/common-1.2.5.tgz differ diff --git a/library/ix-dev/community/immich/ci/no-extra-values.yaml b/library/ix-dev/community/immich/ci/no-extra-values.yaml index b464a431805..b947c05c60e 100644 --- a/library/ix-dev/community/immich/ci/no-extra-values.yaml +++ b/library/ix-dev/community/immich/ci/no-extra-values.yaml @@ -19,4 +19,3 @@ immichStorage: immichConfig: enableML: false - enableTypesense: false diff --git a/library/ix-dev/community/immich/ci/no-typesenes-values.yaml b/library/ix-dev/community/immich/ci/no-typesenes-values.yaml deleted file mode 100644 index 8472753b286..00000000000 --- a/library/ix-dev/community/immich/ci/no-typesenes-values.yaml +++ /dev/null @@ -1,21 +0,0 @@ -immichStorage: - uploads: - type: pvc - library: - type: pvc - thumbs: - type: pvc - profile: - type: pvc - video: - type: pvc - pgData: - type: pvc - pgBackup: - type: emptyDir - emptyDirConfig: - medium: "" - size: "" - -immichConfig: - enableTypesense: false diff --git a/library/ix-dev/community/immich/questions.yaml b/library/ix-dev/community/immich/questions.yaml index 5a4a807590d..839639096b6 100644 --- a/library/ix-dev/community/immich/questions.yaml +++ b/library/ix-dev/community/immich/questions.yaml @@ -49,13 +49,6 @@ questions: schema: type: boolean default: true - - variable: enableTypesense - label: Enable Typesense - description: | - Enable Typesense - schema: - type: boolean - default: true - variable: immichNetwork label: "" diff --git a/library/ix-dev/community/immich/templates/_configuration.tpl b/library/ix-dev/community/immich/templates/_configuration.tpl index 941b9de771f..12f155a126d 100644 --- a/library/ix-dev/community/immich/templates/_configuration.tpl +++ b/library/ix-dev/community/immich/templates/_configuration.tpl @@ -24,11 +24,6 @@ {{- $dbURL := (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" $dbUser $dbPass $dbHost $dbName) -}} - {{- $typesenseKey := randAlphaNum 32 -}} - {{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-immich-creds" $fullname)) -}} - {{- $typesenseKey = ((index .data "TYPESENSE_API_KEY") | b64dec) -}} - {{- end -}} - {{- $mlURL := printf "http://%v-machinelearning:%v" $fullname .Values.immichNetwork.machinelearningPort }} secret: @@ -56,13 +51,6 @@ secret: {{- if .Values.immichConfig.enableML }} IMMICH_MACHINE_LEARNING_URL: {{ $mlURL | quote }} {{- end }} - TYPESENSE_ENABLED: {{ .Values.immichConfig.enableTypesense | quote }} - TYPESENSE_API_KEY: {{ $typesenseKey }} - {{- if .Values.immichConfig.enableTypesense }} - TYPESENSE_PROTOCOL: http - TYPESENSE_HOST: {{ printf "%v-typesense" $fullname }} - TYPESENSE_PORT: {{ .Values.immichNetwork.typesensePort | quote }} - {{- end }} DB_USERNAME: {{ $dbUser }} DB_PASSWORD: {{ $dbPass }} DB_HOSTNAME: {{ $dbHost }} @@ -73,14 +61,6 @@ secret: REDIS_PORT: "6379" REDIS_DBINDEX: "0" - {{- if .Values.immichConfig.enableTypesense }} - typesense-creds: - enabled: true - data: - TYPESENSE_API_KEY: {{ $typesenseKey }} - TYPESENSE_DATA_DIR: /typesense-data - {{- end }} - configmap: server-config: enabled: true diff --git a/library/ix-dev/community/immich/templates/_immich-server.tpl b/library/ix-dev/community/immich/templates/_immich-server.tpl index 288d2870e82..7c40594eecd 100644 --- a/library/ix-dev/community/immich/templates/_immich-server.tpl +++ b/library/ix-dev/community/immich/templates/_immich-server.tpl @@ -1,6 +1,5 @@ {{- define "immich.server.workload" -}} -{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}} -{{- $typesenseUrl := printf "http://%v-typesense:%v/health" $fullname .Values.immichNetwork.typesensePort }} +{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) }} workload: server: enabled: true @@ -48,7 +47,4 @@ workload: "secretName" "postgres-creds") | nindent 8 }} {{- include "ix.v1.common.app.redisWait" (dict "name" "redis-wait" "secretName" "redis-creds") | nindent 8 }} - {{- if .Values.immichConfig.enableTypesense }} - {{- include "immich.wait.init" (dict "url" $typesenseUrl) | indent 8 }} - {{- end }} {{- end -}} diff --git a/library/ix-dev/community/immich/templates/_immich-typesense.tpl b/library/ix-dev/community/immich/templates/_immich-typesense.tpl deleted file mode 100644 index 46fabdee798..00000000000 --- a/library/ix-dev/community/immich/templates/_immich-typesense.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{- define "immich.typesense.workload" -}} -{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}} -{{- $url := printf "http://%v:%v/api/server-info/ping" $fullname .Values.immichNetwork.webuiPort }} -workload: - typesense: - enabled: true - type: Deployment - podSpec: - hostNetwork: false - containers: - typesense: - enabled: true - primary: true - imageSelector: typesenseImage - args: - - --api-port - - {{ .Values.immichNetwork.typesensePort | quote }} - securityContext: - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - readOnlyRootFilesystem: false - envFrom: - - secretRef: - name: typesense-creds - probes: - liveness: - enabled: true - type: http - path: /health - port: {{ .Values.immichNetwork.typesensePort }} - readiness: - enabled: true - type: http - path: /health - port: {{ .Values.immichNetwork.typesensePort }} - startup: - enabled: true - type: http - path: /health - port: {{ .Values.immichNetwork.typesensePort }} -{{- end -}} diff --git a/library/ix-dev/community/immich/templates/_persistence.tpl b/library/ix-dev/community/immich/templates/_persistence.tpl index b16d12e86e4..a46827beefc 100644 --- a/library/ix-dev/community/immich/templates/_persistence.tpl +++ b/library/ix-dev/community/immich/templates/_persistence.tpl @@ -71,15 +71,6 @@ persistence: microservices: microservices: mountPath: /microcache - {{- if .Values.immichConfig.enableTypesense }} - typsense: - enabled: true - type: emptyDir - targetSelector: - typesense: - typesense: - mountPath: /typesense-data - {{- end -}} {{- if .Values.immichConfig.enableML }} mlcache: enabled: true @@ -104,7 +95,6 @@ persistence: redis: mountPath: /tmp - {{/* Database */}} {{- include "ix.v1.common.app.postgresPersistence" (dict "pgData" .Values.immichStorage.pgData diff --git a/library/ix-dev/community/immich/templates/_postgres.tpl b/library/ix-dev/community/immich/templates/_postgres.tpl index 0e7ac05894b..25b00d9905c 100644 --- a/library/ix-dev/community/immich/templates/_postgres.tpl +++ b/library/ix-dev/community/immich/templates/_postgres.tpl @@ -1,7 +1,13 @@ {{- define "postgres.workload" -}} +{{- $psql := "PGPASSWORD=${POSTGRES_PASSWORD} psql --host=${POSTGRES_HOST} --dbname=${POSTGRES_DB} --username=${POSTGRES_USER}" -}} +{{- $tasks := (list + (printf "%s -c \"ALTER DATABASE ${POSTGRES_DB} REFRESH COLLATION VERSION;\"" $psql) +) }} + workload: {{- include "ix.v1.common.app.postgres" (dict "secretName" "postgres-creds" "resources" .Values.resources + "imageSelector" "pgvectorImage" + "preUpgradeTasks" $tasks "ixChartContext" .Values.ixChartContext) | nindent 2 }} - {{- end -}} diff --git a/library/ix-dev/community/immich/templates/_service.tpl b/library/ix-dev/community/immich/templates/_service.tpl index 452067dbc1c..ba9a4b718f7 100644 --- a/library/ix-dev/community/immich/templates/_service.tpl +++ b/library/ix-dev/community/immich/templates/_service.tpl @@ -38,20 +38,6 @@ service: port: {{ .Values.immichNetwork.machinelearningPort }} protocol: http targetSelector: machinelearning - {{- end -}} - - {{- if .Values.immichConfig.enableTypesense }} - typesense: - enabled: true - type: ClusterIP - targetSelector: typesense - ports: - typesense: - enabled: true - primary: true - port: {{ .Values.immichNetwork.typesensePort }} - protocol: http - targetSelector: typesense {{- end }} redis: diff --git a/library/ix-dev/community/immich/templates/common.yaml b/library/ix-dev/community/immich/templates/common.yaml index bb30b02fad2..d4e33d09a6d 100644 --- a/library/ix-dev/community/immich/templates/common.yaml +++ b/library/ix-dev/community/immich/templates/common.yaml @@ -7,9 +7,6 @@ {{- if .Values.immichConfig.enableML -}} {{- $_ := mustMergeOverwrite .Values (include "immich.machinelearning.workload" $ | fromYaml) -}} {{- end -}} -{{- if .Values.immichConfig.enableTypesense -}} - {{- $_ := mustMergeOverwrite .Values (include "immich.typesense.workload" $ | fromYaml) -}} -{{- end -}} {{- $_ := mustMergeOverwrite .Values (include "immich.persistence" $ | fromYaml) -}} {{- $_ := mustMergeOverwrite .Values (include "immich.service" $ | fromYaml) -}} {{- $_ := mustMergeOverwrite .Values (include "postgres.workload" $ | fromYaml) -}} diff --git a/library/ix-dev/community/immich/upgrade_info.json b/library/ix-dev/community/immich/upgrade_info.json index dc39e91f415..9069ef54664 100644 --- a/library/ix-dev/community/immich/upgrade_info.json +++ b/library/ix-dev/community/immich/upgrade_info.json @@ -1,4 +1,4 @@ { "filename": "values.yaml", - "keys": ["image", "webImage", "proxyImage", "mlImage", "typesenseImage"] + "keys": ["image", "webImage", "proxyImage", "mlImage"] } diff --git a/library/ix-dev/community/immich/upgrade_strategy b/library/ix-dev/community/immich/upgrade_strategy index 17637327d7d..b45bd1b0dc0 100755 --- a/library/ix-dev/community/immich/upgrade_strategy +++ b/library/ix-dev/community/immich/upgrade_strategy @@ -8,13 +8,13 @@ from catalog_update.upgrade_strategy import semantic_versioning RE_STABLE_VERSION_BASE = r'\d+\.\d+\.\d+' ENUMS = { - 'typesenseImage': { - 'RE_STABLE_VERSION': re.compile(RE_STABLE_VERSION_BASE), - 'STRIP_TEXT': '' - }, 'default': { 'RE_STABLE_VERSION': re.compile(rf'v{RE_STABLE_VERSION_BASE}'), 'STRIP_TEXT': 'v' + }, + 'pgvectorImage': { + 'RE_STABLE_VERSION': re.compile(rf'pg15-v{RE_STABLE_VERSION_BASE}'), + 'STRIP_TEXT': 'pg15-v' } } diff --git a/library/ix-dev/community/immich/values.yaml b/library/ix-dev/community/immich/values.yaml index 6db58be2d52..1f2b50890a4 100644 --- a/library/ix-dev/community/immich/values.yaml +++ b/library/ix-dev/community/immich/values.yaml @@ -1,17 +1,17 @@ image: repository: altran1502/immich-server pullPolicy: IfNotPresent - tag: v1.90.2 + tag: v1.91.3 mlImage: repository: altran1502/immich-machine-learning pullPolicy: IfNotPresent - tag: v1.90.2 + tag: v1.91.3 -typesenseImage: - repository: typesense/typesense +pgvectorImage: + repository: tensorchord/pgvecto-rs pullPolicy: IfNotPresent - tag: 0.25.1 + tag: pg15-v0.1.11 resources: limits: @@ -23,7 +23,6 @@ immichGPU: {} immichConfig: publicLoginMessage: '' enableML: true - enableTypesense: true immichNetwork: webuiPort: 30041 @@ -32,7 +31,6 @@ immichNetwork: # in the future. machinelearningPort: 32002 microservicesPort: 32003 - typesensePort: 32004 immichStorage: uploads: