_persistence.tpl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {{- define "logseq.persistence" -}}
  2. persistence:
  3. nginx:
  4. enabled: true
  5. type: configmap
  6. objectName: nginx-config
  7. defaultMode: "0600"
  8. targetSelector:
  9. logseq:
  10. logseq:
  11. mountPath: /etc/nginx/conf.d/default.conf
  12. subPath: nginx.conf
  13. readOnly: true
  14. tmp:
  15. enabled: true
  16. type: emptyDir
  17. targetSelector:
  18. logseq:
  19. logseq:
  20. mountPath: /tmp
  21. varcache:
  22. enabled: true
  23. type: emptyDir
  24. targetSelector:
  25. logseq:
  26. logseq:
  27. mountPath: /var/cache/nginx
  28. varrun:
  29. enabled: true
  30. type: emptyDir
  31. targetSelector:
  32. logseq:
  33. logseq:
  34. mountPath: /var/run
  35. {{- range $idx, $storage := .Values.logseqStorage.additionalStorages }}
  36. {{ printf "logseq-%v" (int $idx) }}:
  37. enabled: true
  38. {{- include "logseq.storage.ci.migration" (dict "storage" $storage) }}
  39. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  40. targetSelector:
  41. logseq:
  42. logseq:
  43. mountPath: {{ $storage.mountPath }}
  44. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  45. 01-permissions:
  46. mountPath: /mnt/directories{{ $storage.mountPath }}
  47. {{- end }}
  48. {{- end -}}
  49. {{- if .Values.logseqNetwork.certificateID }}
  50. cert:
  51. enabled: true
  52. type: secret
  53. objectName: logseq-cert
  54. defaultMode: "0600"
  55. items:
  56. - key: tls.key
  57. path: tls.key
  58. - key: tls.crt
  59. path: tls.crt
  60. targetSelector:
  61. logseq:
  62. logseq:
  63. mountPath: /etc/nginx/certs
  64. readOnly: true
  65. scaleCertificate:
  66. logseq-cert:
  67. enabled: true
  68. id: {{ .Values.logseqNetwork.certificateID }}
  69. {{- end -}}
  70. {{- end -}}
  71. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  72. {{- define "logseq.storage.ci.migration" -}}
  73. {{- $storage := .storage -}}
  74. {{- if $storage.hostPath -}}
  75. {{- $_ := set $storage "hostPathConfig" dict -}}
  76. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  77. {{- end -}}
  78. {{- end -}}