_persistence.tpl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {{- define "paperless.persistence" -}}
  2. persistence:
  3. data:
  4. enabled: true
  5. type: {{ .Values.paperlessStorage.data.type }}
  6. datasetName: {{ .Values.paperlessStorage.data.datasetName | default "" }}
  7. hostPath: {{ .Values.paperlessStorage.data.hostPath | default "" }}
  8. targetSelector:
  9. paperless:
  10. paperless:
  11. mountPath: /usr/src/paperless/data
  12. media:
  13. enabled: true
  14. type: {{ .Values.paperlessStorage.media.type }}
  15. datasetName: {{ .Values.paperlessStorage.media.datasetName | default "" }}
  16. hostPath: {{ .Values.paperlessStorage.media.hostPath | default "" }}
  17. targetSelector:
  18. paperless:
  19. paperless:
  20. mountPath: /usr/src/paperless/media
  21. consume:
  22. enabled: true
  23. type: {{ .Values.paperlessStorage.consume.type }}
  24. datasetName: {{ .Values.paperlessStorage.consume.datasetName | default "" }}
  25. hostPath: {{ .Values.paperlessStorage.consume.hostPath | default "" }}
  26. targetSelector:
  27. paperless:
  28. paperless:
  29. mountPath: /usr/src/paperless/consume
  30. trash:
  31. enabled: true
  32. type: {{ .Values.paperlessStorage.trash.type }}
  33. datasetName: {{ .Values.paperlessStorage.trash.datasetName | default "" }}
  34. hostPath: {{ .Values.paperlessStorage.trash.hostPath | default "" }}
  35. targetSelector:
  36. paperless:
  37. paperless:
  38. mountPath: /usr/src/paperless/trash
  39. 01-permissions:
  40. mountPath: /mnt/directories/trash
  41. tmp:
  42. enabled: true
  43. type: emptyDir
  44. targetSelector:
  45. paperless:
  46. paperless:
  47. mountPath: /tmp
  48. {{- range $idx, $storage := .Values.paperlessStorage.additionalStorages }}
  49. {{ printf "paperless-%v" (int $idx) }}:
  50. enabled: true
  51. type: {{ $storage.type }}
  52. datasetName: {{ $storage.datasetName | default "" }}
  53. hostPath: {{ $storage.hostPath | default "" }}
  54. targetSelector:
  55. paperless:
  56. paperless:
  57. mountPath: {{ $storage.mountPath }}
  58. {{- end }}
  59. postgresdata:
  60. enabled: true
  61. type: {{ .Values.paperlessStorage.pgData.type }}
  62. datasetName: {{ .Values.paperlessStorage.pgData.datasetName | default "" }}
  63. hostPath: {{ .Values.paperlessStorage.pgData.hostPath | default "" }}
  64. targetSelector:
  65. # Postgres pod
  66. postgres:
  67. # Postgres container
  68. postgres:
  69. mountPath: /var/lib/postgresql/data
  70. # Postgres - Permissions container
  71. # Different than the 01-permissions
  72. permissions:
  73. mountPath: /mnt/directories/postgres_data
  74. postgresbackup:
  75. enabled: true
  76. type: {{ .Values.paperlessStorage.pgBackup.type }}
  77. datasetName: {{ .Values.paperlessStorage.pgBackup.datasetName | default "" }}
  78. hostPath: {{ .Values.paperlessStorage.pgBackup.hostPath | default "" }}
  79. targetSelector:
  80. # Postgres backup pod
  81. postgresbackup:
  82. # Postgres backup container
  83. postgresbackup:
  84. mountPath: /postgres_backup
  85. # Postgres - Permissions container
  86. # Different than the 01-permissions
  87. permissions:
  88. mountPath: /mnt/directories/postgres_backup
  89. {{- end -}}