_persistence.tpl 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. {{- $size := "" -}}
  61. {{- if $storage.size -}}
  62. {{- $size = (printf "%vGi" $storage.size) -}}
  63. {{- end }}
  64. enabled: true
  65. type: {{ $storage.type }}
  66. datasetName: {{ $storage.datasetName | default "" }}
  67. hostPath: {{ $storage.hostPath | default "" }}
  68. server: {{ $storage.server | default "" }}
  69. share: {{ $storage.share | default "" }}
  70. domain: {{ $storage.domain | default "" }}
  71. username: {{ $storage.username | default "" }}
  72. password: {{ $storage.password | default "" }}
  73. size: {{ $size }}
  74. {{- if eq $storage.type "smb-pv-pvc" }}
  75. mountOptions:
  76. - key: noperm
  77. {{- end }}
  78. targetSelector:
  79. frigate:
  80. frigate:
  81. mountPath: {{ $storage.mountPath }}
  82. {{- end }}
  83. {{- end -}}