_persistence.tpl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {{- define "frigate.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.frigateStorage.config.type }}
  6. datasetName: {{ .Values.frigateStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.frigateStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. frigate:
  10. frigate:
  11. mountPath: /config
  12. 01-init:
  13. mountPath: /config
  14. media:
  15. enabled: true
  16. type: {{ .Values.frigateStorage.media.type }}
  17. datasetName: {{ .Values.frigateStorage.media.datasetName | default "" }}
  18. hostPath: {{ .Values.frigateStorage.media.hostPath | default "" }}
  19. targetSelector:
  20. frigate:
  21. frigate:
  22. mountPath: /media
  23. tmp:
  24. enabled: true
  25. type: emptyDir
  26. targetSelector:
  27. frigate:
  28. frigate:
  29. mountPath: /tmp
  30. cache:
  31. enabled: true
  32. type: emptyDir
  33. medium: Memory
  34. size: {{ printf "%vGi" .Values.frigateStorage.cache.sizeGiB }}
  35. targetSelector:
  36. frigate:
  37. frigate:
  38. mountPath: /tmp/cache
  39. shm:
  40. enabled: true
  41. type: emptyDir
  42. medium: Memory
  43. size: {{ printf "%vMi" .Values.frigateStorage.shm.sizeMiB }}
  44. targetSelector:
  45. frigate:
  46. frigate:
  47. mountPath: /dev/shm
  48. {{- if .Values.frigateConfig.mountUSBBus }}
  49. usb-bus:
  50. enabled: true
  51. type: hostPath
  52. hostPath: /dev/bus/usb
  53. targetSelector:
  54. frigate:
  55. frigate:
  56. mountPath: /dev/bus/usb
  57. {{- end -}}
  58. {{- range $idx, $storage := .Values.frigateStorage.additionalStorages }}
  59. {{ printf "frigate-%v" (int $idx) }}:
  60. enabled: true
  61. type: {{ $storage.type }}
  62. datasetName: {{ $storage.datasetName | default "" }}
  63. hostPath: {{ $storage.hostPath | default "" }}
  64. targetSelector:
  65. frigate:
  66. frigate:
  67. mountPath: {{ $storage.mountPath }}
  68. {{- end }}
  69. {{- end -}}