_immich-machinelearning.tpl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {{- define "immich.machinelearning.workload" -}}
  2. {{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
  3. {{- $url := printf "http://%v:%v/api/server-info/ping" $fullname .Values.immichNetwork.webuiPort -}}
  4. {{- $img := "mlImage" -}}
  5. {{- with .Values.immichConfig.mlImageType -}}
  6. {{- $img = . -}}
  7. {{- end }}
  8. workload:
  9. machinelearning:
  10. enabled: true
  11. type: Deployment
  12. podSpec:
  13. hostNetwork: false
  14. containers:
  15. machinelearning:
  16. enabled: true
  17. primary: true
  18. imageSelector: {{ $img }}
  19. securityContext:
  20. runAsUser: 0
  21. runAsGroup: 0
  22. runAsNonRoot: false
  23. readOnlyRootFilesystem: false
  24. envFrom:
  25. - configMapRef:
  26. name: ml-config
  27. probes:
  28. liveness:
  29. enabled: true
  30. type: http
  31. port: {{ .Values.immichNetwork.machinelearningPort }}
  32. path: /ping
  33. readiness:
  34. enabled: true
  35. type: http
  36. port: {{ .Values.immichNetwork.machinelearningPort }}
  37. path: /ping
  38. startup:
  39. enabled: true
  40. type: http
  41. port: {{ .Values.immichNetwork.machinelearningPort }}
  42. path: /ping
  43. initContainers:
  44. {{- include "immich.wait.init" (dict "url" $url) | indent 8 }}
  45. {{- end -}}