_persistence.tpl 2.4 KB

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