_persistence.tpl 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. {{- define "deluge.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.delugeStorage.config.type }}
  6. datasetName: {{ .Values.delugeStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.delugeStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. deluge:
  10. deluge:
  11. mountPath: /config
  12. config:
  13. mountPath: /config
  14. downloads:
  15. enabled: true
  16. type: {{ .Values.delugeStorage.downloads.type }}
  17. datasetName: {{ .Values.delugeStorage.downloads.datasetName | default "" }}
  18. hostPath: {{ .Values.delugeStorage.downloads.hostPath | default "" }}
  19. targetSelector:
  20. deluge:
  21. deluge:
  22. mountPath: /downloads
  23. {{- range $idx, $storage := .Values.delugeStorage.additionalStorages }}
  24. {{ printf "deluge-%v" (int $idx) }}:
  25. enabled: true
  26. type: {{ $storage.type }}
  27. datasetName: {{ $storage.datasetName | default "" }}
  28. hostPath: {{ $storage.hostPath | default "" }}
  29. targetSelector:
  30. deluge:
  31. deluge:
  32. mountPath: {{ $storage.mountPath }}
  33. {{- end }}
  34. {{- end -}}