_immich-microservices.tpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{- define "immich.microservices.workload" -}}
  2. {{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
  3. {{- $url := printf "http://%v-server:%v/server-info/ping" $fullname .Values.immichNetwork.serverPort }}
  4. workload:
  5. microservices:
  6. enabled: true
  7. type: Deployment
  8. podSpec:
  9. hostNetwork: false
  10. containers:
  11. microservices:
  12. enabled: true
  13. primary: true
  14. imageSelector: image
  15. securityContext:
  16. runAsUser: 0
  17. runAsGroup: 0
  18. runAsNonRoot: false
  19. readOnlyRootFilesystem: false
  20. command: /bin/sh
  21. args:
  22. - -c
  23. - /usr/src/app/start-microservices.sh
  24. envFrom:
  25. - secretRef:
  26. name: immich-creds
  27. - configMapRef:
  28. name: micro-config
  29. probes:
  30. liveness:
  31. enabled: true
  32. type: tcp
  33. port: {{ .Values.immichNetwork.microservicesPort }}
  34. readiness:
  35. enabled: true
  36. type: tcp
  37. port: {{ .Values.immichNetwork.microservicesPort }}
  38. startup:
  39. enabled: true
  40. type: tcp
  41. port: {{ .Values.immichNetwork.microservicesPort }}
  42. initContainers:
  43. {{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
  44. "secretName" "postgres-creds") | nindent 8 }}
  45. {{- include "ix.v1.common.app.redisWait" (dict "name" "redis-wait"
  46. "secretName" "redis-creds") | nindent 8 }}
  47. {{- include "immich.wait.init" (dict "url" $url) | indent 8 }}
  48. {{- with .Values.immichGPU }}
  49. scaleGPU:
  50. {{- range $key, $value := . }}
  51. - gpu:
  52. {{ $key }}: {{ $value }}
  53. targetSelector:
  54. microservices:
  55. - microservices
  56. {{- end -}}
  57. {{- end -}}
  58. {{- end -}}