_persistence.tpl 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {{- define "navidrome.persistence" -}}
  2. persistence:
  3. data:
  4. enabled: true
  5. type: {{ .Values.navidromeStorage.data.type }}
  6. datasetName: {{ .Values.navidromeStorage.data.datasetName | default "" }}
  7. hostPath: {{ .Values.navidromeStorage.data.hostPath | default "" }}
  8. targetSelector:
  9. navidrome:
  10. navidrome:
  11. mountPath: /data
  12. 01-permissions:
  13. mountPath: /mnt/directories/data
  14. music:
  15. enabled: true
  16. type: {{ .Values.navidromeStorage.music.type }}
  17. datasetName: {{ .Values.navidromeStorage.music.datasetName | default "" }}
  18. hostPath: {{ .Values.navidromeStorage.music.hostPath | default "" }}
  19. targetSelector:
  20. navidrome:
  21. navidrome:
  22. mountPath: /music
  23. 01-permissions:
  24. mountPath: /mnt/directories/music
  25. {{- range $idx, $storage := .Values.navidromeStorage.additionalStorages }}
  26. {{ printf "navidrome-%v" (int $idx) }}:
  27. {{- $size := "" -}}
  28. {{- if $storage.size -}}
  29. {{- $size = (printf "%vGi" $storage.size) -}}
  30. {{- end }}
  31. enabled: true
  32. type: {{ $storage.type }}
  33. datasetName: {{ $storage.datasetName | default "" }}
  34. hostPath: {{ $storage.hostPath | default "" }}
  35. server: {{ $storage.server | default "" }}
  36. share: {{ $storage.share | default "" }}
  37. domain: {{ $storage.domain | default "" }}
  38. username: {{ $storage.username | default "" }}
  39. password: {{ $storage.password | default "" }}
  40. size: {{ $size }}
  41. {{- if eq $storage.type "smb-pv-pvc" }}
  42. mountOptions:
  43. - key: noperm
  44. {{- end }}
  45. targetSelector:
  46. navidrome:
  47. navidrome:
  48. mountPath: {{ $storage.mountPath }}
  49. 01-permissions:
  50. mountPath: /mnt/directories{{ $storage.mountPath }}
  51. {{- end }}
  52. {{- end -}}