_persistence.tpl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {{- define "transmission.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.transmissionStorage.config) | nindent 4 }}
  6. targetSelector:
  7. transmission:
  8. transmission:
  9. mountPath: /config
  10. {{- if and (eq .Values.transmissionStorage.config.type "ixVolume")
  11. (not (.Values.transmissionStorage.config.ixVolumeConfig | default dict).aclEnable) }}
  12. 01-permissions:
  13. mountPath: /mnt/directories/config
  14. {{- end }}
  15. download-complete:
  16. enabled: true
  17. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.transmissionStorage.downloadsComplete) | nindent 4 }}
  18. targetSelector:
  19. transmission:
  20. transmission:
  21. mountPath: {{ .Values.transmissionStorage.downloadsDir | default "/downloads/complete" }}
  22. {{- if and (eq .Values.transmissionStorage.downloadsComplete.type "ixVolume")
  23. (not (.Values.transmissionStorage.downloadsComplete.ixVolumeConfig | default dict).aclEnable) }}
  24. 01-permissions:
  25. mountPath: /mnt/directories/complete
  26. {{- end }}
  27. {{- if .Values.transmissionStorage.enableIncompleteDir }}
  28. download-incomplete:
  29. enabled: true
  30. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.transmissionStorage.downloadsIncomplete) | nindent 4 }}
  31. targetSelector:
  32. transmission:
  33. transmission:
  34. mountPath: {{ .Values.transmissionStorage.incompleteDir | default "/downloads/incomplete" }}
  35. {{- if and (eq .Values.transmissionStorage.downloadsIncomplete.type "ixVolume")
  36. (not (.Values.transmissionStorage.downloadsIncomplete.ixVolumeConfig | default dict).aclEnable) }}
  37. 01-permissions:
  38. mountPath: /mnt/directories/incomplete
  39. {{- end }}
  40. {{- end -}}
  41. {{- range $idx, $storage := .Values.transmissionStorage.additionalStorages }}
  42. {{ printf "transmission-%v:" (int $idx) }}
  43. enabled: true
  44. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  45. targetSelector:
  46. transmission:
  47. transmission:
  48. mountPath: {{ $storage.mountPath }}
  49. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  50. 01-permissions:
  51. mountPath: /mnt/directories{{ $storage.mountPath }}
  52. {{- end }}
  53. {{- end }}
  54. {{- end -}}