_persistence.tpl 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. {{- if .Values.navidromeConfig.localPlayback }}
  28. snd-device:
  29. enabled: true
  30. type: hostPath
  31. hostPath: /dev/snd
  32. targetSelector:
  33. navidrome:
  34. navidrome:
  35. mountPath: /dev/snd
  36. {{- end }}
  37. {{- range $idx, $storage := .Values.navidromeStorage.additionalStorages }}
  38. {{ printf "navidrome-%v:" (int $idx) }}
  39. enabled: true
  40. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  41. targetSelector:
  42. navidrome:
  43. navidrome:
  44. mountPath: {{ $storage.mountPath }}
  45. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  46. 01-permissions:
  47. mountPath: /mnt/directories{{ $storage.mountPath }}
  48. {{- end }}
  49. {{- end }}
  50. {{- end -}}