_persistence.tpl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {{- define "dashy.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.dashyStorage.data) | nindent 4 }}
  6. targetSelector:
  7. dashy:
  8. dashy:
  9. mountPath: /app/public
  10. # Mount the same dir to different path on init container
  11. # So we can check if `/data` is empty and copy the default
  12. # from /app/public
  13. init-config:
  14. mountPath: /data
  15. tmp:
  16. enabled: true
  17. type: emptyDir
  18. targetSelector:
  19. dashy:
  20. dashy:
  21. mountPath: /tmp
  22. {{- range $idx, $storage := .Values.dashyStorage.additionalStorages }}
  23. {{ printf "dashy-%v:" (int $idx) }}
  24. enabled: true
  25. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  26. targetSelector:
  27. dashy:
  28. dashy:
  29. mountPath: {{ $storage.mountPath }}
  30. {{- end -}}
  31. {{- if .Values.dashyNetwork.certificateID }}
  32. cert:
  33. enabled: true
  34. type: secret
  35. objectName: dashy-cert
  36. defaultMode: "0600"
  37. items:
  38. - key: tls.key
  39. path: tls.key
  40. - key: tls.crt
  41. path: tls.crt
  42. targetSelector:
  43. dashy:
  44. dashy:
  45. mountPath: /cert
  46. readOnly: true
  47. scaleCertificate:
  48. dashy-cert:
  49. enabled: true
  50. id: {{ .Values.dashyNetwork.certificateID }}
  51. {{- end -}}
  52. {{- end -}}