2022-12-18 20:36:22 +00:00
|
|
|
{{/* 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 }}
|
2022-11-15 00:14:12 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ .Values.podSecurityContext.runAsUser }}
|
|
|
|
runAsGroup: {{ .Values.podSecurityContext.runAsGroup }}
|
|
|
|
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
|
|
|
|
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
|
|
|
command:
|
2022-12-18 20:36:22 +00:00
|
|
|
- /bin/sh
|
|
|
|
- ./entrypoint.sh
|
2022-11-15 00:14:12 +00:00
|
|
|
volumeMounts:
|
2022-12-18 20:36:22 +00:00
|
|
|
- name: uploads
|
|
|
|
mountPath: {{ .Values.persistence.uploads.mountPath }}
|
|
|
|
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'
|
2022-12-16 20:25:23 +00:00
|
|
|
readinessProbe:
|
2022-11-15 00:14:12 +00:00
|
|
|
exec:
|
|
|
|
command:
|
2022-12-18 20:36:22 +00:00
|
|
|
- /bin/sh
|
2022-12-16 20:25:23 +00:00
|
|
|
- -c
|
|
|
|
- |
|
2022-12-18 20:36:22 +00:00
|
|
|
grep -q entrypoint /proc/1/cmdline || exit 1
|
2022-11-15 00:14:12 +00:00
|
|
|
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:
|
2022-12-18 20:36:22 +00:00
|
|
|
- /bin/sh
|
2022-12-16 20:25:23 +00:00
|
|
|
- -c
|
|
|
|
- |
|
2022-12-18 20:36:22 +00:00
|
|
|
grep -q entrypoint /proc/1/cmdline || exit 1
|
2022-11-15 00:14:12 +00:00
|
|
|
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:
|
2022-12-18 20:36:22 +00:00
|
|
|
- /bin/sh
|
2022-12-16 20:25:23 +00:00
|
|
|
- -c
|
|
|
|
- |
|
2022-12-18 20:36:22 +00:00
|
|
|
grep -q entrypoint /proc/1/cmdline || exit 1
|
2022-11-15 00:14:12 +00:00
|
|
|
initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
|
|
|
|
periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
|
2022-12-16 20:25:23 +00:00
|
|
|
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
|
2022-11-15 00:14:12 +00:00
|
|
|
{{- end -}}
|