_persistence.tpl 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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: {{ .Values.transmissionStorage.downloadsDir | default "/downloads/complete" }}
  23. 01-permissions:
  24. mountPath: /mnt/directories/complete
  25. {{- if .Values.transmissionStorage.enableIncompleteDir }}
  26. download-incomplete:
  27. enabled: true
  28. type: {{ .Values.transmissionStorage.downloadsIncomplete.type }}
  29. datasetName: {{ .Values.transmissionStorage.downloadsIncomplete.datasetName | default "" }}
  30. hostPath: {{ .Values.transmissionStorage.downloadsIncomplete.hostPath | default "" }}
  31. targetSelector:
  32. transmission:
  33. transmission:
  34. mountPath: {{ .Values.transmissionStorage.incompleteDir | default "/downloads/incomplete" }}
  35. 01-permissions:
  36. mountPath: /mnt/directories/incomplete
  37. {{- end -}}
  38. {{- range $idx, $storage := .Values.transmissionStorage.additionalStorages }}
  39. {{ printf "transmission-%v" (int $idx) }}:
  40. {{- $size := "" -}}
  41. {{- if $storage.size -}}
  42. {{- $size = (printf "%vGi" $storage.size) -}}
  43. {{- end }}
  44. enabled: true
  45. type: {{ $storage.type }}
  46. datasetName: {{ $storage.datasetName | default "" }}
  47. hostPath: {{ $storage.hostPath | default "" }}
  48. server: {{ $storage.server | default "" }}
  49. share: {{ $storage.share | default "" }}
  50. domain: {{ $storage.domain | default "" }}
  51. username: {{ $storage.username | default "" }}
  52. password: {{ $storage.password | default "" }}
  53. size: {{ $size }}
  54. {{- if eq $storage.type "smb-pv-pvc" }}
  55. mountOptions:
  56. - key: noperm
  57. {{- end }}
  58. targetSelector:
  59. transmission:
  60. transmission:
  61. mountPath: {{ $storage.mountPath }}
  62. 01-permissions:
  63. mountPath: /mnt/directories{{ $storage.mountPath }}
  64. {{- end }}
  65. {{- end -}}