_persistence.tpl 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. {{- $size := "" -}}
  24. {{- if $storage.size -}}
  25. {{- $size = (printf "%vGi" $storage.size) -}}
  26. {{- end }}
  27. enabled: true
  28. type: {{ $storage.type }}
  29. datasetName: {{ $storage.datasetName | default "" }}
  30. hostPath: {{ $storage.hostPath | default "" }}
  31. server: {{ $storage.server | default "" }}
  32. share: {{ $storage.share | default "" }}
  33. domain: {{ $storage.domain | default "" }}
  34. username: {{ $storage.username | default "" }}
  35. password: {{ $storage.password | default "" }}
  36. size: {{ $size }}
  37. {{- if eq $storage.type "smb-pv-pvc" }}
  38. mountOptions:
  39. - key: noperm
  40. {{- end }}
  41. targetSelector:
  42. listmonk:
  43. listmonk:
  44. mountPath: {{ $storage.mountPath }}
  45. {{- end -}}
  46. {{/* Database */}}
  47. postgresdata:
  48. enabled: true
  49. type: {{ .Values.listmonkStorage.pgData.type }}
  50. datasetName: {{ .Values.listmonkStorage.pgData.datasetName | default "" }}
  51. hostPath: {{ .Values.listmonkStorage.pgData.hostPath | default "" }}
  52. targetSelector:
  53. # Postgres pod
  54. postgres:
  55. # Postgres container
  56. postgres:
  57. mountPath: /var/lib/postgresql/data
  58. # Postgres - Permissions container
  59. # Different than the 01-permissions
  60. permissions:
  61. mountPath: /mnt/directories/postgres_data
  62. postgresbackup:
  63. enabled: true
  64. type: {{ .Values.listmonkStorage.pgBackup.type }}
  65. datasetName: {{ .Values.listmonkStorage.pgBackup.datasetName | default "" }}
  66. hostPath: {{ .Values.listmonkStorage.pgBackup.hostPath | default "" }}
  67. targetSelector:
  68. # Postgres backup pod
  69. postgresbackup:
  70. # Postgres backup container
  71. postgresbackup:
  72. mountPath: /postgres_backup
  73. # Postgres - Permissions container
  74. # Different than the 01-permissions
  75. permissions:
  76. mountPath: /mnt/directories/postgres_backup
  77. {{- end -}}