_persistence.tpl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. {{- $size := "" -}}
  46. {{- if $storage.size -}}
  47. {{- $size = (printf "%vGi" $storage.size) -}}
  48. {{- end }}
  49. enabled: true
  50. type: {{ $storage.type }}
  51. datasetName: {{ $storage.datasetName | default "" }}
  52. hostPath: {{ $storage.hostPath | default "" }}
  53. server: {{ $storage.server | default "" }}
  54. share: {{ $storage.share | default "" }}
  55. domain: {{ $storage.domain | default "" }}
  56. username: {{ $storage.username | default "" }}
  57. password: {{ $storage.password | default "" }}
  58. size: {{ $size }}
  59. {{- if eq $storage.type "smb-pv-pvc" }}
  60. mountOptions:
  61. - key: noperm
  62. {{- end }}
  63. targetSelector:
  64. sftpgo:
  65. sftpgo:
  66. mountPath: {{ $storage.mountPath }}
  67. 01-permissions:
  68. mountPath: /mnt/directories{{ $storage.mountPath }}
  69. {{- end -}}
  70. {{- if .Values.sftpgoNetwork.certificateID }}
  71. cert:
  72. enabled: true
  73. type: secret
  74. objectName: sftpgo-cert
  75. defaultMode: "0600"
  76. items:
  77. - key: tls.key
  78. path: private.key
  79. - key: tls.crt
  80. path: public.crt
  81. targetSelector:
  82. sftpgo:
  83. sftpgo:
  84. mountPath: /srv/sftpgo/certs
  85. readOnly: true
  86. scaleCertificate:
  87. sftpgo-cert:
  88. enabled: true
  89. id: {{ .Values.sftpgoNetwork.certificateID }}
  90. {{- end -}}
  91. {{- end -}}