_persistence.tpl 1.4 KB

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