apiVersion: apps/v1 kind: Deployment metadata: name: frigate labels: app: frigate spec: replicas: 1 selector: matchLabels: app: frigate template: metadata: labels: app: frigate spec: containers: - name: frigate image: ghcr.io/blakeblackshear/frigate:0.15.0-rocm securityContext: privileged: true ports: - name: http containerPort: 5000 protocol: TCP - name: rtmp containerPort: 1935 protocol: TCP - name: rtsp containerPort: 8554 protocol: TCP - name: webrtc containerPort: 8555 protocol: TCP volumeMounts: - name: frigate-media-storage mountPath: /media - name: frigate-conf-storage mountPath: /config - name: frigate-configmap mountPath: /config/config.yml subPath: config.yml - name: dshm mountPath: /dev/shm - name: cache mountPath: /tmp/cache - name: coral mountPath: /dev/bus/usb - name: dev-dri mountPath: /dev/dri - name: dev-kfd mountPath: /dev/kfd volumes: - name: frigate-media-storage persistentVolumeClaim: claimName: frigate-media-pvc - name: frigate-conf-storage persistentVolumeClaim: claimName: frigate-conf-pvc - name: dshm emptyDir: medium: Memory sizeLimit: 5G - name: frigate-configmap configMap: name: frigate-configmap # pass through GPU for inference - name: dev-dri hostPath: path: /dev/dri - name: dev-kfd hostPath: path: /dev/kfd # 1G of memory - name: cache emptyDir: medium: "Memory" sizeLimit: 1000Mi # usb coral - name: coral hostPath: path: /dev/bus/usb --- apiVersion: v1 kind: PersistentVolume metadata: name: frigate-media-pv labels: pvc_type: frigate-media-pv spec: capacity: storage: 1000Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: {{ .Values.frigate.mediapath }} --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: frigate-media-pvc spec: accessModes: - ReadWriteOnce volumeMode: Filesystem storageClassName: "" volumeName: frigate-media-pv resources: requests: storage: 1000Gi --- apiVersion: v1 kind: PersistentVolume metadata: name: frigate-conf-pv labels: pvc_type: frigate-conf-pv spec: capacity: storage: 1Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: {{ .Values.frigate.confpath }} --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: frigate-conf-pvc spec: accessModes: - ReadWriteOnce volumeMode: Filesystem storageClassName: "" volumeName: frigate-conf-pv resources: requests: storage: 1Gi --- apiVersion: v1 kind: Service metadata: name: frigate labels: app: frigate spec: type: NodePort ports: - name: rtmp port: 1935 protocol: TCP targetPort: rtmp nodePort: 30002 - name: rtsp port: 8554 protocol: TCP targetPort: rtsp nodePort: 30003 - name: http port: 5000 protocol: TCP targetPort: http nodePort: 30004 selector: app: frigate --- apiVersion: v1 kind: ConfigMap metadata: name: frigate-configmap data: config.yml: |- {{ (tpl (.Files.Get "configs/frigate.yaml") . ) | nindent 4 }}