2024-03-20 22:08:11 +00:00
|
|
|
{{/* Make sure all variables are set properly */}}
|
|
|
|
{{- include "tc.v1.common.loader.init" . }}
|
|
|
|
|
|
|
|
{{- $fname := (include "tc.v1.common.lib.chart.names.fullname" .) -}}
|
|
|
|
|
2024-05-26 17:57:20 +00:00
|
|
|
{{- $main := .Values.workload.main.podSpec.containers.main -}}
|
|
|
|
{{- $main = mustMergeOverwrite $main (include "immich.server" . | fromYaml) -}}
|
|
|
|
{{- $_ := set .Values.workload.main.podSpec.containers "main" $main -}}
|
2024-03-20 22:08:11 +00:00
|
|
|
|
|
|
|
{{/* 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 -}}
|
|
|
|
|
|
|
|
{{/* 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" . }}
|