_immich-server.tpl 1.9 KB

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