_persistence.tpl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {{- define "sftpgo.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.sftpgoStorage.config.type }}
  6. datasetName: {{ .Values.sftpgoStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.sftpgoStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. sftpgo:
  10. sftpgo:
  11. mountPath: /var/lib/sftpgo
  12. 01-permissions:
  13. mountPath: /mnt/directories/config
  14. data:
  15. enabled: true
  16. type: {{ .Values.sftpgoStorage.data.type }}
  17. datasetName: {{ .Values.sftpgoStorage.data.datasetName | default "" }}
  18. hostPath: {{ .Values.sftpgoStorage.data.hostPath | default "" }}
  19. targetSelector:
  20. sftpgo:
  21. sftpgo:
  22. mountPath: /srv/sftpgo/data
  23. 01-permissions:
  24. mountPath: /mnt/directories/data
  25. backups:
  26. enabled: true
  27. type: {{ .Values.sftpgoStorage.backups.type }}
  28. datasetName: {{ .Values.sftpgoStorage.backups.datasetName | default "" }}
  29. hostPath: {{ .Values.sftpgoStorage.backups.hostPath | default "" }}
  30. targetSelector:
  31. sftpgo:
  32. sftpgo:
  33. mountPath: /srv/sftpgo/backups
  34. 01-permissions:
  35. mountPath: /mnt/directories/backups
  36. tmp:
  37. enabled: true
  38. type: emptyDir
  39. targetSelector:
  40. sftpgo:
  41. sftpgo:
  42. mountPath: /tmp
  43. {{- range $idx, $storage := .Values.sftpgoStorage.additionalStorages }}
  44. {{ printf "sftpgo-%v" (int $idx) }}:
  45. enabled: true
  46. type: {{ $storage.type }}
  47. datasetName: {{ $storage.datasetName | default "" }}
  48. hostPath: {{ $storage.hostPath | default "" }}
  49. targetSelector:
  50. sftpgo:
  51. sftpgo:
  52. mountPath: {{ $storage.mountPath }}
  53. 01-permissions:
  54. mountPath: /mnt/directories{{ $storage.mountPath }}
  55. {{- end -}}
  56. {{- if .Values.sftpgoNetwork.certificateID }}
  57. cert:
  58. enabled: true
  59. type: secret
  60. objectName: sftpgo-cert
  61. defaultMode: "0600"
  62. items:
  63. - key: tls.key
  64. path: private.key
  65. - key: tls.crt
  66. path: public.crt
  67. targetSelector:
  68. sftpgo:
  69. sftpgo:
  70. mountPath: /srv/sftpgo/certs
  71. readOnly: true
  72. scaleCertificate:
  73. sftpgo-cert:
  74. enabled: true
  75. id: {{ .Values.sftpgoNetwork.certificateID }}
  76. {{- end -}}
  77. {{- end -}}