_persistence.tpl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. {{- include "ix.v1.common.app.postgresPersistence"
  47. (dict "pgData" .Values.listmonkStorage.pgData
  48. "pgBackup" .Values.listmonkStorage.pgBackup
  49. ) | nindent 2 }}
  50. {{- end -}}