_sftpgo.tpl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {{- define "sftpgo.workload" -}}
  2. workload:
  3. sftpgo:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.sftpgoNetwork.hostNetwork }}
  9. terminationGracePeriodSeconds: {{ .Values.sftpgoConfig.graceTime }}
  10. containers:
  11. sftpgo:
  12. enabled: true
  13. primary: true
  14. imageSelector: {{ .Values.sftpgoConfig.imageSelector }}
  15. securityContext:
  16. runAsUser: {{ .Values.sftpgoRunAs.user }}
  17. runAsGroup: {{ .Values.sftpgoRunAs.group }}
  18. envFrom:
  19. - configMapRef:
  20. name: sftpgo-config
  21. {{ with .Values.sftpgoConfig.additionalEnvs }}
  22. envList:
  23. {{ range $env := . }}
  24. - name: {{ $env.name }}
  25. value: {{ $env.value }}
  26. {{ end }}
  27. {{ end }}
  28. probes:
  29. {{- $protocol := "http" -}}
  30. {{- if .Values.sftpgoNetwork.certificateID -}}
  31. {{- $protocol = "https" -}}
  32. {{- end }}
  33. liveness:
  34. enabled: true
  35. type: {{ $protocol }}
  36. port: {{ .Values.sftpgoNetwork.webPort }}
  37. path: /healthz
  38. readiness:
  39. enabled: true
  40. type: {{ $protocol }}
  41. port: {{ .Values.sftpgoNetwork.webPort }}
  42. path: /healthz
  43. startup:
  44. enabled: true
  45. type: {{ $protocol }}
  46. port: {{ .Values.sftpgoNetwork.webPort }}
  47. path: /healthz
  48. initContainers:
  49. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  50. "UID" .Values.sftpgoRunAs.user
  51. "GID" .Values.sftpgoRunAs.group
  52. "mode" "check"
  53. "type" "install") | nindent 8 }}
  54. {{- end -}}