_persistence.tpl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {{- define "planka.persistence" -}}
  2. persistence:
  3. avatars:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.plankaStorage.avatars) | nindent 4 }}
  6. targetSelector:
  7. planka:
  8. planka:
  9. mountPath: /app/public/user-avatars
  10. {{- if and (eq .Values.plankaStorage.avatars.type "ixVolume")
  11. (not (.Values.plankaStorage.avatars.ixVolumeConfig | default dict).aclEnable) }}
  12. 01-permissions:
  13. mountPath: /mnt/directories/avatars
  14. {{- end }}
  15. bg-img:
  16. enabled: true
  17. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.plankaStorage.backgroundImages) | nindent 4 }}
  18. targetSelector:
  19. planka:
  20. planka:
  21. mountPath: /app/public/project-background-images
  22. {{- if and (eq .Values.plankaStorage.backgroundImages.type "ixVolume")
  23. (not (.Values.plankaStorage.backgroundImages.ixVolumeConfig | default dict).aclEnable) }}
  24. 01-permissions:
  25. mountPath: /mnt/directories/backgroundImages
  26. {{- end }}
  27. attachments:
  28. enabled: true
  29. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.plankaStorage.attachments) | nindent 4 }}
  30. targetSelector:
  31. planka:
  32. planka:
  33. mountPath: /app/private/attachments
  34. {{- if and (eq .Values.plankaStorage.attachments.type "ixVolume")
  35. (not (.Values.plankaStorage.attachments.ixVolumeConfig | default dict).aclEnable) }}
  36. 01-permissions:
  37. mountPath: /mnt/directories/attachments
  38. {{- end }}
  39. tmp:
  40. enabled: true
  41. type: emptyDir
  42. targetSelector:
  43. planka:
  44. planka:
  45. mountPath: /tmp
  46. {{- range $idx, $storage := .Values.plankaStorage.additionalStorages }}
  47. {{ printf "planka-%v:" (int $idx) }}
  48. enabled: true
  49. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  50. targetSelector:
  51. planka:
  52. planka:
  53. mountPath: {{ $storage.mountPath }}
  54. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  55. 01-permissions:
  56. mountPath: /mnt/directories{{ $storage.mountPath }}
  57. {{- end }}
  58. {{- end }}
  59. {{- include "ix.v1.common.app.postgresPersistence"
  60. (dict "pgData" .Values.plankaStorage.pgData
  61. "pgBackup" .Values.plankaStorage.pgBackup
  62. ) | nindent 2 }}
  63. {{- end -}}