_persistence.tpl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {{- define "metube.persistence" -}}
  2. persistence:
  3. downloads:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.metubeStorage.downloads) | nindent 4 }}
  6. targetSelector:
  7. metube:
  8. metube:
  9. mountPath: /downloads
  10. {{- if and (eq .Values.metubeStorage.downloads.type "ixVolume")
  11. (not (.Values.metubeStorage.downloads.ixVolumeConfig | default dict).aclEnable) }}
  12. 01-permissions:
  13. mountPath: /mnt/directories/downloads
  14. {{- end }}
  15. tmp:
  16. enabled: true
  17. type: emptyDir
  18. targetSelector:
  19. metube:
  20. metube:
  21. mountPath: /tmp
  22. {{- range $idx, $storage := .Values.metubeStorage.additionalStorages }}
  23. {{ printf "metube-%v" (int $idx) }}:
  24. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  25. enabled: true
  26. targetSelector:
  27. metube:
  28. metube:
  29. mountPath: {{ $storage.mountPath }}
  30. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  31. 01-permissions:
  32. mountPath: /mnt/directories{{ $storage.mountPath }}
  33. {{- end }}
  34. {{- end }}
  35. {{- end -}}