frigate

by alekc

Helm chartv7.8.0App 0.14.1

NVR With Realtime Object Detection for IP Cameras

About this chart

frigate

NVR With Realtime Object Detection for IP Cameras

This Helm Chart installs Frigate on to Kubernetes.

Homepage: https://github.com/blakeblackshear/blakeshome-charts/tree/master/charts/frigate

Install

Using Helm, you can easily install and test Frigate in a Kubernetes cluster by running the following:

Add Helm repo

First, add the repo if you haven't already done so:

helm repo add blakeblackshear https://blakeblackshear.github.io/blakeshome-charts/

Minimum Config

At minimum, you'll need to define the following Frigate configuration properties. For information, see the Docs.

# values.yaml
config: |
  mqtt:
    host: "mqtt.example.com"
    port: 1883
    user: admin
    password: "<your_mqtt_password>"
  cameras:
    # Define at least one camera
    back:
      ffmpeg:
        inputs:
          - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
            roles:
              - detect

Configuration Updates

Since the config key is stored in a configMap which is mounted as a read-only file, the Frigate UI will be unable to update the configuration, and config migration will fail.

If persistence.config.ephemeralWritableConfigYaml is set to true along with persistence.config.enabled, the config.yml will be copied into the /config volume mount rather than mounted into it.

Copying the config file means migrations can run, and updates to settings, zones, etc.. will be written to the running configuration. However as soon as the pod is restarted, the changes will be lost, so you will have to retrieve the config.yml either from the pod, or by performing a GET /api/config and updating your helm values config key with the new yaml.

Install Chart

Now install the chart:

helm upgrade --install \
  my-release \
  blakeblackshear/frigate \
  -f values.yaml

Maintainers

NameEmailUrl
blakeblackshear[email protected]
billimek[email protected]

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}Set Pod affinity rules
configstringOmitted for brevity. See values.yaml.frigate configuration - see Docs for more info
coral.enabledboolfalseenables the use of a Coral device
coral.hostPathstring"/dev/bus/usb"path on the host to which to mount the Coral device
envobject{}additional ENV variables to set. Prefix with FRIGATE_ to target Frigate configuration values
envFromSecretslist[]set environment variables from Secret(s)
extraVolumeMountslist[]declare additional volume mounts
extraVolumeslist[]declare extra volumes to use for Frigate
fullnameOverridestring""Overrides the Full Name of resources
gpu.nvidia.enabledboolfalseEnables NVIDIA GPU compatibility. Must also use the "amd64nvidia" tagged image
gpu.nvidia.runtimeClassNamestringnilOverrides the default runtimeClassName
image.pullPolicystring"IfNotPresent"Docker image pull policy
image.repositorystring"ghcr.io/blakeblackshear/frigate"Docker registry/repository to pull the image from
image.tagstring"0.12.0"Overrides the default tag (appVersion) used in Chart.yaml (Docker Hub)
imagePullSecretslist[]Docker image pull policy
ingress.annotationsobject{}annotations to configure your Ingress. See your Ingress Controller's Docs for more info.
ingress.enabledboolfalseEnables the use of an Ingress Controller to front the Service and can provide HTTPS
ingress.hostslist[{"host":"chart.example.local","paths":[{"path":"/", "portName":"http-auth"}]}]list of hosts and their paths and ports that ingress controller should repsond to.
ingress.tlslist[]list of TLS configurations
nameOverridestring""Overrides the name of resources
nodeSelectorobject{}Node Selector configuration
persistence.data.*This config key is obsolete and should not be used. Use persistence.media.* and persistence.config.* instead.
persistence.config.enabledboolfalseEnables persistence for the data directory
persistence.config.sizestring"10Gi"size/capacity of the PVC
persistence.config.skipuninstallboolfalseDo not delete the pvc upon helm uninstall
persistence.config.accessModestring"ReadWriteOnce"access mode to use for the PVC
persistence.config.ephemeralWritableConfigYamlbooltrueCopy config into volume mount for writable ephemeral config support
persistence.media.enabledboolfalseEnables persistence for the data directory
persistence.media.sizestring"10Gi"size/capacity of the PVC
persistence.media.skipuninstallboolfalseDo not delete the pvc upon helm uninstall
persistence.media.accessModestring"ReadWriteOnce"access mode to use for the PVC
podAnnotationsobject{}Set additonal pod Annotations
probes.liveness.enabledbooltrue
probes.liveness.failureThresholdint5
probes.liveness.initialDelaySecondsint30
probes.liveness.timeoutSecondsint10
probes.readiness.enabledbooltrue
probes.readiness.failureThresholdint5
probes.readiness.initialDelaySecondsint30
probes.readiness.timeoutSecondsint10
probes.startup.enabledboolfalse
probes.startup.failureThresholdint30
probes.startup.periodSecondsint10
resourcesobject{}Set resource limits/requests for the Pod(s)
securityContextobject{}Set Security Context
service.annotationsobject{}
service.labelsobject{}
service.loadBalancerIPstringnilSet specific IP address for LoadBalancer. service.type must be set to LoadBalancer
service.portint5000Port the Service should communicate on
service.typestring"ClusterIP"Type of Service to use
shmSizestring"1Gi"amount of shared memory to use for caching
strategyTypestring"Recreate"upgrade strategy type (e.g. Recreate or RollingUpdate)
tolerationslist[]Node toleration configuration

Deploy frigate with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has frigate on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartfrigate is pinned at v7.8.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply