_persistence.tpl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. {{- $size := "" -}}
  38. {{- if $storage.size -}}
  39. {{- $size = (printf "%vGi" $storage.size) -}}
  40. {{- end }}
  41. enabled: true
  42. type: {{ $storage.type }}
  43. datasetName: {{ $storage.datasetName | default "" }}
  44. hostPath: {{ $storage.hostPath | default "" }}
  45. server: {{ $storage.server | default "" }}
  46. share: {{ $storage.share | default "" }}
  47. domain: {{ $storage.domain | default "" }}
  48. username: {{ $storage.username | default "" }}
  49. password: {{ $storage.password | default "" }}
  50. size: {{ $size }}
  51. {{- if eq $storage.type "smb-pv-pvc" }}
  52. mountOptions:
  53. - key: noperm
  54. {{- end }}
  55. targetSelector:
  56. logseq:
  57. logseq:
  58. mountPath: {{ $storage.mountPath }}
  59. {{- end -}}
  60. {{- if .Values.logseqNetwork.certificateID }}
  61. cert:
  62. enabled: true
  63. type: secret
  64. objectName: logseq-cert
  65. defaultMode: "0600"
  66. items:
  67. - key: tls.key
  68. path: tls.key
  69. - key: tls.crt
  70. path: tls.crt
  71. targetSelector:
  72. logseq:
  73. logseq:
  74. mountPath: /etc/nginx/certs
  75. readOnly: true
  76. scaleCertificate:
  77. logseq-cert:
  78. enabled: true
  79. id: {{ .Values.logseqNetwork.certificateID }}
  80. {{- end -}}
  81. {{- end -}}