_persistence.tpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{- define "unifi.persistence" -}}
  2. persistence:
  3. data:
  4. enabled: true
  5. type: {{ .Values.unifiStorage.data.type }}
  6. datasetName: {{ .Values.unifiStorage.data.datasetName | default "" }}
  7. hostPath: {{ .Values.unifiStorage.data.hostPath | default "" }}
  8. targetSelector:
  9. unifi:
  10. unifi:
  11. mountPath: /unifi
  12. 01-permissions:
  13. mountPath: /mnt/directories/unifi
  14. 02-certs:
  15. mountPath: /unifi
  16. tmp:
  17. enabled: true
  18. type: emptyDir
  19. targetSelector:
  20. unifi:
  21. unifi:
  22. mountPath: /tmp
  23. {{- range $idx, $storage := .Values.unifiStorage.additionalStorages }}
  24. {{ printf "unifi-%v" (int $idx) }}:
  25. enabled: true
  26. type: {{ $storage.type }}
  27. datasetName: {{ $storage.datasetName | default "" }}
  28. hostPath: {{ $storage.hostPath | default "" }}
  29. targetSelector:
  30. unifi:
  31. unifi:
  32. mountPath: {{ $storage.mountPath }}
  33. 01-permissions:
  34. mountPath: /mnt/directories{{ $storage.mountPath }}
  35. {{- end -}}
  36. {{- if .Values.unifiNetwork.certificateID }}
  37. cert:
  38. enabled: true
  39. type: secret
  40. objectName: unifi-cert
  41. defaultMode: "0600"
  42. items:
  43. - key: tls.key
  44. path: private.key
  45. - key: tls.crt
  46. path: public.crt
  47. targetSelector:
  48. unifi:
  49. 02-certs:
  50. mountPath: /ix/cert
  51. readOnly: true
  52. scaleCertificate:
  53. unifi-cert:
  54. enabled: true
  55. id: {{ .Values.unifiNetwork.certificateID }}
  56. {{- end -}}
  57. {{- end -}}