_persistence.tpl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {{- define "planka.persistence" -}}
  2. persistence:
  3. avatars:
  4. enabled: true
  5. {{- include "planka.storage.ci.migration" (dict "storage" .Values.plankaStorage.avatars) }}
  6. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.plankaStorage.avatars) | nindent 4 }}
  7. targetSelector:
  8. planka:
  9. planka:
  10. mountPath: /app/public/user-avatars
  11. bg-img:
  12. enabled: true
  13. {{- include "planka.storage.ci.migration" (dict "storage" .Values.plankaStorage.backgroundImages) }}
  14. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.plankaStorage.backgroundImages) | nindent 4 }}
  15. targetSelector:
  16. planka:
  17. planka:
  18. mountPath: /app/public/project-background-images
  19. attachments:
  20. enabled: true
  21. {{- include "planka.storage.ci.migration" (dict "storage" .Values.plankaStorage.attachments) }}
  22. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.plankaStorage.attachments) | nindent 4 }}
  23. targetSelector:
  24. planka:
  25. planka:
  26. mountPath: /app/private/attachments
  27. tmp:
  28. enabled: true
  29. type: emptyDir
  30. targetSelector:
  31. planka:
  32. planka:
  33. mountPath: /tmp
  34. {{- range $idx, $storage := .Values.plankaStorage.additionalStorages }}
  35. {{ printf "planka-%v:" (int $idx) }}
  36. enabled: true
  37. {{- include "planka.storage.ci.migration" (dict "storage" $storage) }}
  38. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  39. targetSelector:
  40. planka:
  41. planka:
  42. mountPath: {{ $storage.mountPath }}
  43. {{- end }}
  44. {{- include "planka.storage.ci.migration" (dict "storage" .Values.plankaStorage.pgData) }}
  45. {{- include "planka.storage.ci.migration" (dict "storage" .Values.plankaStorage.pgBackup) }}
  46. {{- include "ix.v1.common.app.postgresPersistence"
  47. (dict "pgData" .Values.plankaStorage.pgData
  48. "pgBackup" .Values.plankaStorage.pgBackup
  49. ) | nindent 2 }}
  50. {{- end -}}
  51. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  52. {{- define "planka.storage.ci.migration" -}}
  53. {{- $storage := .storage -}}
  54. {{- if $storage.hostPath -}}
  55. {{- $_ := set $storage "hostPathConfig" dict -}}
  56. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  57. {{- end -}}
  58. {{- end -}}