Files
chart/library/ix-dev/community/frigate/templates/_persistence.tpl
Stavros Kois 310d6d6426 NAS-123485 / 24.04 / Add frigate to community apps (#1434)
* Add `frigate` to `community` apps

* add cia values

* add initial templtes

* add values

* add common

* fix typo

* another one

* make it non-fail no matter the indendation

* typo

* questions and gpu

* perms

* more caps

* port

* shm and usb

* whops

* privieleged on usb bus mount

* invert logic
2023-08-11 18:23:30 +03:00

70 lines
1.8 KiB
Smarty

{{- define "frigate.persistence" -}}
persistence:
config:
enabled: true
type: {{ .Values.frigateStorage.config.type }}
datasetName: {{ .Values.frigateStorage.config.datasetName | default "" }}
hostPath: {{ .Values.frigateStorage.config.hostPath | default "" }}
targetSelector:
frigate:
frigate:
mountPath: /config
01-init:
mountPath: /config
media:
enabled: true
type: {{ .Values.frigateStorage.media.type }}
datasetName: {{ .Values.frigateStorage.media.datasetName | default "" }}
hostPath: {{ .Values.frigateStorage.media.hostPath | default "" }}
targetSelector:
frigate:
frigate:
mountPath: /media
tmp:
enabled: true
type: emptyDir
targetSelector:
frigate:
frigate:
mountPath: /tmp
cache:
enabled: true
type: emptyDir
medium: Memory
size: {{ printf "%vGi" .Values.frigateStorage.cache.sizeGiB }}
targetSelector:
frigate:
frigate:
mountPath: /tmp/cache
shm:
enabled: true
type: emptyDir
medium: Memory
size: {{ printf "%vMi" .Values.frigateStorage.shm.sizeMiB }}
targetSelector:
frigate:
frigate:
mountPath: /dev/shm
{{- if .Values.frigateConfig.mountUSBBus }}
usb-bus:
enabled: true
type: hostPath
hostPath: /dev/bus/usb
targetSelector:
frigate:
frigate:
mountPath: /dev/bus/usb
{{- end -}}
{{- range $idx, $storage := .Values.frigateStorage.additionalStorages }}
{{ printf "frigate-%v" (int $idx) }}:
enabled: true
type: {{ $storage.type }}
datasetName: {{ $storage.datasetName | default "" }}
hostPath: {{ $storage.hostPath | default "" }}
targetSelector:
frigate:
frigate:
mountPath: {{ $storage.mountPath }}
{{- end }}
{{- end -}}