_persistence.tpl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {{- define "upb.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.upbStorage.config.type }}
  6. datasetName: {{ .Values.upbStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.upbStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. unifi-protect:
  10. unifi-protect:
  11. mountPath: /config
  12. 01-permissions:
  13. mountPath: /mnt/directories/config
  14. data:
  15. enabled: true
  16. type: {{ .Values.upbStorage.data.type }}
  17. datasetName: {{ .Values.upbStorage.data.datasetName | default "" }}
  18. hostPath: {{ .Values.upbStorage.data.hostPath | default "" }}
  19. targetSelector:
  20. unifi-protect:
  21. unifi-protect:
  22. mountPath: /data
  23. 01-permissions:
  24. mountPath: /mnt/directories/data
  25. tmp:
  26. enabled: true
  27. type: emptyDir
  28. targetSelector:
  29. unifi-protect:
  30. unifi-protect:
  31. mountPath: /tmp
  32. {{- range $idx, $storage := .Values.upbStorage.additionalStorages }}
  33. {{ printf "upb-%v" (int $idx) }}:
  34. enabled: true
  35. type: {{ $storage.type }}
  36. datasetName: {{ $storage.datasetName | default "" }}
  37. hostPath: {{ $storage.hostPath | default "" }}
  38. targetSelector:
  39. unifi-protect:
  40. unifi-protect:
  41. mountPath: {{ $storage.mountPath }}
  42. 01-permissions:
  43. mountPath: /mnt/directories{{ $storage.mountPath }}
  44. {{- end }}
  45. {{- end -}}