_persistence.tpl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {{- define "listmonk.persistence" -}}
  2. persistence:
  3. uploads:
  4. enabled: true
  5. type: {{ .Values.listmonkStorage.uploads.type }}
  6. datasetName: {{ .Values.listmonkStorage.uploads.datasetName | default "" }}
  7. hostPath: {{ .Values.listmonkStorage.uploads.hostPath | default "" }}
  8. targetSelector:
  9. listmonk:
  10. listmonk:
  11. mountPath: /listmonk/uploads
  12. 01-permissions:
  13. mountPath: /mnt/directories/uploads
  14. tmp:
  15. enabled: true
  16. type: emptyDir
  17. targetSelector:
  18. listmonk:
  19. listmonk:
  20. mountPath: /tmp
  21. {{- range $idx, $storage := .Values.listmonkStorage.additionalStorages }}
  22. {{ printf "listmonk-%v" (int $idx) }}:
  23. enabled: true
  24. type: {{ $storage.type }}
  25. datasetName: {{ $storage.datasetName | default "" }}
  26. hostPath: {{ $storage.hostPath | default "" }}
  27. targetSelector:
  28. listmonk:
  29. listmonk:
  30. mountPath: {{ $storage.mountPath }}
  31. {{- end -}}
  32. {{/* Database */}}
  33. postgresdata:
  34. enabled: true
  35. type: {{ .Values.listmonkStorage.pgData.type }}
  36. datasetName: {{ .Values.listmonkStorage.pgData.datasetName | default "" }}
  37. hostPath: {{ .Values.listmonkStorage.pgData.hostPath | default "" }}
  38. targetSelector:
  39. # Postgres pod
  40. postgres:
  41. # Postgres container
  42. postgres:
  43. mountPath: /var/lib/postgresql/data
  44. # Postgres - Permissions container
  45. # Different than the 01-permissions
  46. permissions:
  47. mountPath: /mnt/directories/postgres_data
  48. postgresbackup:
  49. enabled: true
  50. type: {{ .Values.listmonkStorage.pgBackup.type }}
  51. datasetName: {{ .Values.listmonkStorage.pgBackup.datasetName | default "" }}
  52. hostPath: {{ .Values.listmonkStorage.pgBackup.hostPath | default "" }}
  53. targetSelector:
  54. # Postgres backup pod
  55. postgresbackup:
  56. # Postgres backup container
  57. postgresbackup:
  58. mountPath: /postgres_backup
  59. # Postgres - Permissions container
  60. # Different than the 01-permissions
  61. permissions:
  62. mountPath: /mnt/directories/postgres_backup
  63. {{- end -}}