_persistence.tpl 1.6 KB

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