_persistence.tpl 1.5 KB

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