_persistence.tpl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. {{- $size := "" -}}
  51. {{- if $storage.size -}}
  52. {{- $size = (printf "%vGi" $storage.size) -}}
  53. {{- end }}
  54. enabled: true
  55. type: {{ $storage.type }}
  56. datasetName: {{ $storage.datasetName | default "" }}
  57. hostPath: {{ $storage.hostPath | default "" }}
  58. server: {{ $storage.server | default "" }}
  59. share: {{ $storage.share | default "" }}
  60. domain: {{ $storage.domain | default "" }}
  61. username: {{ $storage.username | default "" }}
  62. password: {{ $storage.password | default "" }}
  63. size: {{ $size }}
  64. {{- if eq $storage.type "smb-pv-pvc" }}
  65. mountOptions:
  66. - key: noperm
  67. {{- end }}
  68. targetSelector:
  69. paperless:
  70. paperless:
  71. mountPath: {{ $storage.mountPath }}
  72. {{- end }}
  73. postgresdata:
  74. enabled: true
  75. type: {{ .Values.paperlessStorage.pgData.type }}
  76. datasetName: {{ .Values.paperlessStorage.pgData.datasetName | default "" }}
  77. hostPath: {{ .Values.paperlessStorage.pgData.hostPath | default "" }}
  78. targetSelector:
  79. # Postgres pod
  80. postgres:
  81. # Postgres container
  82. postgres:
  83. mountPath: /var/lib/postgresql/data
  84. # Postgres - Permissions container
  85. # Different than the 01-permissions
  86. permissions:
  87. mountPath: /mnt/directories/postgres_data
  88. postgresbackup:
  89. enabled: true
  90. type: {{ .Values.paperlessStorage.pgBackup.type }}
  91. datasetName: {{ .Values.paperlessStorage.pgBackup.datasetName | default "" }}
  92. hostPath: {{ .Values.paperlessStorage.pgBackup.hostPath | default "" }}
  93. targetSelector:
  94. # Postgres backup pod
  95. postgresbackup:
  96. # Postgres backup container
  97. postgresbackup:
  98. mountPath: /postgres_backup
  99. # Postgres - Permissions container
  100. # Different than the 01-permissions
  101. permissions:
  102. mountPath: /mnt/directories/postgres_backup
  103. {{- end -}}