_persistence.tpl 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {{- define "komga.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. {{- include "komga.storage.ci.migration" (dict "storage" .Values.komgaStorage.config) }}
  6. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.komgaStorage.config) | nindent 4 }}
  7. targetSelector:
  8. komga:
  9. komga:
  10. mountPath: /config
  11. {{- if and (eq .Values.komgaStorage.config.type "ixVolume")
  12. (not (.Values.komgaStorage.config.ixVolumeConfig | default dict).aclEnable) }}
  13. 01-permissions:
  14. mountPath: /mnt/directories/config
  15. {{- end }}
  16. tmp:
  17. enabled: true
  18. type: emptyDir
  19. targetSelector:
  20. komga:
  21. komga:
  22. mountPath: /tmp
  23. {{- range $idx, $storage := .Values.komgaStorage.additionalStorages }}
  24. {{ printf "komga-%v" (int $idx) }}:
  25. enabled: true
  26. {{- include "komga.storage.ci.migration" (dict "storage" $storage) }}
  27. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  28. targetSelector:
  29. komga:
  30. komga:
  31. mountPath: {{ $storage.mountPath }}
  32. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  33. 01-permissions:
  34. mountPath: /mnt/directories{{ $storage.mountPath }}
  35. {{- end }}
  36. {{- end }}
  37. {{- end -}}
  38. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  39. {{- define "komga.storage.ci.migration" -}}
  40. {{- $storage := .storage -}}
  41. {{- if $storage.hostPath -}}
  42. {{- $_ := set $storage "hostPathConfig" dict -}}
  43. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  44. {{- end -}}
  45. {{- end -}}