_persistence.tpl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {{- define "transmission.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.transmissionStorage.config.type }}
  6. datasetName: {{ .Values.transmissionStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.transmissionStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. transmission:
  10. transmission:
  11. mountPath: /config
  12. 01-permissions:
  13. mountPath: /mnt/directories/config
  14. download-complete:
  15. enabled: true
  16. type: {{ .Values.transmissionStorage.downloadsComplete.type }}
  17. datasetName: {{ .Values.transmissionStorage.downloadsComplete.datasetName | default "" }}
  18. hostPath: {{ .Values.transmissionStorage.downloadsComplete.hostPath | default "" }}
  19. targetSelector:
  20. transmission:
  21. transmission:
  22. mountPath: /downloads/complete
  23. 01-permissions:
  24. mountPath: /mnt/directories/complete
  25. download-incomplete:
  26. enabled: true
  27. type: {{ .Values.transmissionStorage.downloadsIncomplete.type }}
  28. datasetName: {{ .Values.transmissionStorage.downloadsIncomplete.datasetName | default "" }}
  29. hostPath: {{ .Values.transmissionStorage.downloadsIncomplete.hostPath | default "" }}
  30. targetSelector:
  31. transmission:
  32. transmission:
  33. mountPath: /downloads/incomplete
  34. 01-permissions:
  35. mountPath: /mnt/directories/incomplete
  36. {{- range $idx, $storage := .Values.transmissionStorage.additionalStorages }}
  37. {{ printf "transmission-%v" (int $idx) }}:
  38. {{- $size := "" -}}
  39. {{- if $storage.size -}}
  40. {{- $size = (printf "%vGi" $storage.size) -}}
  41. {{- end }}
  42. enabled: true
  43. type: {{ $storage.type }}
  44. datasetName: {{ $storage.datasetName | default "" }}
  45. hostPath: {{ $storage.hostPath | default "" }}
  46. server: {{ $storage.server | default "" }}
  47. share: {{ $storage.share | default "" }}
  48. domain: {{ $storage.domain | default "" }}
  49. username: {{ $storage.username | default "" }}
  50. password: {{ $storage.password | default "" }}
  51. size: {{ $size }}
  52. {{- if eq $storage.type "smb-pv-pvc" }}
  53. mountOptions:
  54. - key: noperm
  55. {{- end }}
  56. targetSelector:
  57. transmission:
  58. transmission:
  59. mountPath: {{ $storage.mountPath }}
  60. 01-permissions:
  61. mountPath: /mnt/directories{{ $storage.mountPath }}
  62. {{- end }}
  63. {{- end -}}