194 lines
4.3 KiB
YAML
194 lines
4.3 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
|
|
|
|
cameras:
|
|
Stairway:
|
|
enabled: true
|
|
ffmpeg:
|
|
inputs:
|
|
- path: rtsp://admin:KillerCamera@10.0.5.160:554/h264Preview_01_main
|
|
roles:
|
|
- detect
|
|
- record
|
|
detect:
|
|
enabled: true
|
|
Bell:
|
|
enabled: true
|
|
ffmpeg:
|
|
inputs:
|
|
- path: rtsp://admin:KillerKlingel@10.0.5.161:554/h264Preview_01_main
|
|
roles:
|
|
- detect
|
|
- record
|
|
detect:
|
|
enabled: true
|
|
---
|
|
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 |