_persistence.tpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {{- define "vikunja.persistence" -}}
  2. persistence:
  3. tmp:
  4. enabled: true
  5. type: emptyDir
  6. targetSelector:
  7. vikunja:
  8. vikunja:
  9. mountPath: /tmp
  10. nginxvar:
  11. enabled: true
  12. type: emptyDir
  13. targetSelector:
  14. vikunja-proxy:
  15. vikunja-proxy:
  16. mountPath: /var/cache/nginx
  17. nginxrun:
  18. enabled: true
  19. type: emptyDir
  20. targetSelector:
  21. vikunja-proxy:
  22. vikunja-proxy:
  23. mountPath: /var/run
  24. data:
  25. enabled: true
  26. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.vikunjaStorage.data) | nindent 4 }}
  27. targetSelector:
  28. vikunja-api:
  29. vikunja-api:
  30. mountPath: /app/vikunja/files
  31. {{- if and (eq .Values.vikunjaStorage.data.type "ixVolume")
  32. (not (.Values.vikunjaStorage.data.ixVolumeConfig | default dict).aclEnable) }}
  33. 01-permissions:
  34. mountPath: /mnt/directories/data
  35. {{- end }}
  36. nginx:
  37. enabled: true
  38. type: configmap
  39. objectName: nginx-config
  40. defaultMode: "0600"
  41. targetSelector:
  42. vikunja-proxy:
  43. vikunja-proxy:
  44. mountPath: /etc/nginx/conf.d/default.conf
  45. subPath: nginx-config
  46. readOnly: true
  47. {{- range $idx, $storage := .Values.vikunjaStorage.additionalStorages }}
  48. {{ printf "vikunja-%v" (int $idx) }}:
  49. enabled: true
  50. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  51. targetSelector:
  52. vikunja-api:
  53. vikunja-api:
  54. mountPath: {{ $storage.mountPath }}
  55. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  56. 01-permissions:
  57. mountPath: /mnt/directories{{ $storage.mountPath }}
  58. {{- end }}
  59. {{- end -}}
  60. {{- include "ix.v1.common.app.postgresPersistence"
  61. (dict "pgData" .Values.vikunjaStorage.pgData
  62. "pgBackup" .Values.vikunjaStorage.pgBackup
  63. ) | nindent 2 }}
  64. {{- end -}}