_persistence.tpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. {{- $size := "" -}}
  34. {{- if $storage.size -}}
  35. {{- $size = (printf "%vGi" $storage.size) -}}
  36. {{- end }}
  37. enabled: true
  38. type: {{ $storage.type }}
  39. datasetName: {{ $storage.datasetName | default "" }}
  40. hostPath: {{ $storage.hostPath | default "" }}
  41. server: {{ $storage.server | default "" }}
  42. share: {{ $storage.share | default "" }}
  43. domain: {{ $storage.domain | default "" }}
  44. username: {{ $storage.username | default "" }}
  45. password: {{ $storage.password | default "" }}
  46. size: {{ $size }}
  47. {{- if eq $storage.type "smb-pv-pvc" }}
  48. mountOptions:
  49. - key: noperm
  50. {{- end }}
  51. targetSelector:
  52. linkding:
  53. linkding:
  54. mountPath: {{ $storage.mountPath }}
  55. 01-permissions:
  56. mountPath: /mnt/directories{{ $storage.mountPath }}
  57. {{- end }}
  58. {{- include "ix.v1.common.app.postgresPersistence"
  59. (dict "pgData" .Values.linkdingStorage.pgData
  60. "pgBackup" .Values.linkdingStorage.pgBackup
  61. ) | nindent 2 }}
  62. {{- end -}}