From 2424ad440b4da7e4cb952a2af2d2e4ce07f18dee Mon Sep 17 00:00:00 2001 From: Lumpiasty Date: Sun, 29 Jun 2025 20:22:53 +0200 Subject: [PATCH] enable hwaccel in frigate --- Makefile | 2 +- apps/frigate/release.yaml | 20 ++++++++++++++++++++ talos/patches/frigate.patch | 11 +++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 talos/patches/frigate.patch diff --git a/Makefile b/Makefile index cbe2c8b..5f931e6 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ install-router: gen-talos-config: mkdir -p talos/generated - talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --config-patch @talos/patches/openebs.patch --config-patch @talos/patches/openbao.patch --config-patch @talos/patches/anapistula-delrosalae.patch --output-types controlplane -o talos/generated/anapistula-delrosalae.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443 + talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --config-patch @talos/patches/openebs.patch --config-patch @talos/patches/openbao.patch --config-patch @talos/patches/ollama.patch --config-patch @talos/patches/frigate.patch --config-patch @talos/patches/anapistula-delrosalae.patch --output-types controlplane -o talos/generated/anapistula-delrosalae.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443 talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --output-types worker -o talos/generated/worker.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443 talosctl gen config --with-secrets secrets.yaml --output-types talosconfig -o talos/generated/talosconfig homelab https://kube-api.homelab.lumpiasty.xyz:6443 talosctl config endpoint kube-api.homelab.lumpiasty.xyz diff --git a/apps/frigate/release.yaml b/apps/frigate/release.yaml index 0b6c16a..8aeab7d 100644 --- a/apps/frigate/release.yaml +++ b/apps/frigate/release.yaml @@ -60,6 +60,8 @@ spec: - audio - detect - record + ffmpeg: + hwaccel_args: preset-vaapi go2rtc: streams: @@ -98,3 +100,21 @@ spec: - hosts: - frigate.lumpiasty.xyz secretName: frigate-ingress + + nodeSelector: + kubernetes.io/hostname: anapistula-delrosalae + + # GPU access + extraVolumes: + - name: dri + hostPath: + path: /dev/dri/renderD128 + type: CharDevice + + extraVolumeMounts: + - name: dri + mountPath: /dev/dri/renderD128 + + securityContext: + # Not ideal + privileged: true diff --git a/talos/patches/frigate.patch b/talos/patches/frigate.patch new file mode 100644 index 0000000..4794d83 --- /dev/null +++ b/talos/patches/frigate.patch @@ -0,0 +1,11 @@ +# CSI driver requirement +cluster: + apiServer: + admissionControl: + - name: PodSecurity + configuration: + apiVersion: pod-security.admission.config.k8s.io/v1beta1 + kind: PodSecurityConfiguration + exemptions: + namespaces: + - frigate \ No newline at end of file