Files
k8s-apps/frigate/frigate.yaml
2026-04-07 20:58:34 +00:00

260 lines
5.8 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: frigate-config
namespace: frigate
data:
frigate.yml: |
mqtt:
enabled: true
host: mosquitto.mosquitto.svc.k8s.undercloud.local
port: 1883
user: frigate
password: asecurefrigate
topic_prefix: frigate
auth:
enabled: true
tls:
enabled: false
ffmpeg:
input_args: preset-rtsp-generic
# If your node has Intel iGPU, uncomment:
# hwaccel_args: preset-vaapi
# or:
# hwaccel_args: preset-intel-qsv-h264
record:
enabled: true
retain:
days: 3
mode: motion
alerts:
retain:
days: 14
mode: motion
detections:
retain:
days: 14
mode: motion
cameras:
Stairway:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:KillerCamera@10.0.5.160:554/h264Preview_01_sub
roles:
- detect
- path: rtsp://admin:KillerCamera@10.0.5.160:554/h264Preview_01_main
roles:
- record
detect:
enabled: true
width: 640
height: 360
fps: 5
Bell:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:KillerKlingel@10.0.5.161:554/h264Preview_01_sub
roles:
- detect
- path: rtsp://admin:KillerKlingel@10.0.5.161:554/h264Preview_01_main
roles:
- record
detect:
enabled: true
width: 640
height: 360
fps: 5
Serverraum:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:KillerKamera@10.0.5.162:554/h264Preview_01_sub
roles:
- detect
- path: rtsp://admin:KillerKamera@10.0.5.162:554/h264Preview_01_main
roles:
- record
detect:
enabled: true
width: 640
height: 360
fps: 5
Carport:
enabled: true
ffmpeg:
inputs:
- path: rtsp://admin:KillerKamera@10.0.5.163:554/h264Preview_01_sub
roles:
- detect
- path: rtsp://admin:KillerKamera@10.0.5.163:554/h264Preview_01_main
roles:
- record
detect:
enabled: true
width: 640
height: 360
fps: 5
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: frigate-config
namespace: frigate
spec:
accessModes:
- ReadWriteMany
storageClassName: cephfs-hyper
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: frigate-media
namespace: frigate
spec:
accessModes:
- ReadWriteMany
storageClassName: cephfs-hyper-slow
resources:
requests:
storage: 100Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frigate
namespace: frigate
spec:
replicas: 1
selector:
matchLabels:
app: frigate
template:
metadata:
labels:
app: frigate
spec:
initContainers:
- name: copy-config
image: busybox:1.36
command:
- sh
- -c
- |
echo "Copying Frigate config to writable volume..."
cp /src/frigate.yml /config/config.yml
chmod 0644 /config/config.yml
volumeMounts:
- name: pvc-config
mountPath: /config
- name: frigate-configmap
mountPath: /src
containers:
- name: frigate
image: ghcr.io/blakeblackshear/frigate:0.16.0
imagePullPolicy: IfNotPresent
ports:
- name: https-ui
containerPort: 8971
protocol: TCP
- name: http-internal
containerPort: 5000
protocol: TCP
- name: rtsp
containerPort: 8554
protocol: TCP
- name: webrtc-tcp
containerPort: 8555
protocol: TCP
- name: webrtc-udp
containerPort: 8555
protocol: UDP
env:
- name: TZ
value: Europe/Berlin
#resources:
# requests:
# cpu: 500m
# memory: 1Gi
# limits:
# memory: 4Gi
volumeMounts:
- name: pvc-config
mountPath: /config
- name: media
mountPath: /media/frigate
- name: cache
mountPath: /tmp/cache
- name: localtime
mountPath: /etc/localtime
readOnly: true
securityContext:
privileged: false
volumes:
- name: pvc-config
persistentVolumeClaim:
claimName: frigate-config
- name: media
persistentVolumeClaim:
claimName: frigate-media
- name: cache
emptyDir:
medium: Memory
sizeLimit: 1Gi
- name: localtime
hostPath:
path: /etc/localtime
type: File
- name: frigate-configmap
configMap:
name: frigate-config
---
apiVersion: v1
kind: Service
metadata:
name: frigate
namespace: frigate
spec:
ipFamilies:
- IPv6
- IPv4
ipFamilyPolicy: PreferDualStack
selector:
app: frigate
ports:
- name: https-ui
port: 8971
protocol: TCP
targetPort: 8971
- name: http-internal
port: 5000
protocol: TCP
targetPort: 5000
- name: rtsp
port: 8554
protocol: TCP
targetPort: 8554
- name: webrtc-tcp
port: 8555
protocol: TCP
targetPort: 8555
- name: webrtc-udp
port: 8555
protocol: UDP
targetPort: 8555
sessionAffinity: None
type: ClusterIP