Files
chart/library/ix-dev/community/frigate/templates/_frigate.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

93 lines
2.5 KiB
Smarty

{{- define "frigate.workload" -}}
workload:
frigate:
enabled: true
primary: true
type: Deployment
podSpec:
hostNetwork: {{ .Values.frigateNetwork.hostNetwork }}
containers:
frigate:
enabled: true
primary: true
imageSelector: image
securityContext:
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
{{- if .Values.frigateConfig.mountUSBBus }}
privileged: true
allowPrivilegeEscalation: true
{{- end }}
capabilities:
add:
- CHOWN
- DAC_OVERRIDE
- FOWNER
- SETUID
- SETGID
{{ with .Values.frigateConfig.additionalEnvs }}
envList:
{{ range $env := . }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{ end }}
{{ end }}
probes:
liveness:
enabled: true
type: http
port: 5000
path: /api
readiness:
enabled: true
type: http
port: 5000
path: /api
startup:
enabled: true
type: http
port: 5000
path: /api
initContainers:
01-init:
enabled: true
type: init
imageSelector: bashImage
securityContext:
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
command:
- /bin/sh
args:
- -c
- |
if [ ! -f /config/config.yml ]; then
{
echo 'mqtt:'
echo ' enabled: false'
echo 'cameras:'
echo ' dummy:'
echo ' enabled: false'
echo ' ffmpeg:'
echo ' inputs:'
echo ' - path: rtsp://127.0.0.1:554/rtsp'
echo ' roles:'
echo ' - detect'
} > /config/config.yml
fi
{{- with .Values.frigateGPU }}
scaleGPU:
{{- range $key, $value := . }}
- gpu:
{{ $key }}: {{ $value }}
targetSelector:
frigate:
- frigate
{{- end }}
{{- end -}}
{{- end -}}