diff --git a/apps/frigate/config.yaml b/apps/frigate/config.yaml new file mode 100644 index 0000000..794d3ac --- /dev/null +++ b/apps/frigate/config.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: frigate + namespace: frigate +data: + PUID: "1000" + PGID: "1000" diff --git a/apps/frigate/deployment.yaml b/apps/frigate/deployment.yaml new file mode 100644 index 0000000..855d613 --- /dev/null +++ b/apps/frigate/deployment.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: frigate + namespace: frigate +spec: + selector: + matchLabels: + app: frigate + template: + metadata: + labels: + app: frigate + spec: + containers: + - name: frigate + image: ghcr.io/blakeblackshear/frigate:stable-tensorrt + imagePullPolicy: Always + resources: + limits: + nvidia.com/gpu: 1 + envFrom: + - secretRef: + name: frigate + ports: + - containerPort: 8971 + protocol: TCP + name: http + - containerPort: 8554 + protocol: TCP + name: rtsp + - containerPort: 8555 + protocol: TCP + name: webrtc-tcp + - containerPort: 8555 + protocol: UDP + name: webrtc-udp + volumeMounts: + - mountPath: /config + name: frigate-config + - mountPath: /media/frigate + name: frigate-media + - mountPath: /tmp/cache + name: frigate-media + volumes: + - name: frigate-config + persistentVolumeClaim: + claimName: frigate-config + - name: frigate-media + persistentVolumeClaim: + claimName: frigate-media + - name: cache + emptyDir: + medium: Memory + sizeLimit: 1Gi diff --git a/apps/frigate/ingress.yaml b/apps/frigate/ingress.yaml new file mode 100644 index 0000000..0906d22 --- /dev/null +++ b/apps/frigate/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: frigate + namespace: frigate + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" +spec: + rules: + - host: frigate.michaelthomson.dev + http: + paths: + - pathType: ImplementationSpecific + path: / + backend: + service: + name: frigate + port: + name: http + tls: + - hosts: + - frigate.michaelthomson.dev + secretName: frigate-tls diff --git a/apps/frigate/pvc-config.yaml b/apps/frigate/pvc-config.yaml new file mode 100644 index 0000000..fa6c81f --- /dev/null +++ b/apps/frigate/pvc-config.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: frigate-config + namespace: frigate +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi diff --git a/apps/frigate/pvc-media.yaml b/apps/frigate/pvc-media.yaml new file mode 100644 index 0000000..1d6f5dd --- /dev/null +++ b/apps/frigate/pvc-media.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: frigate-media + namespace: frigate +spec: + accessModes: + - ReadWriteOnce + storageClassName: nfs-client + resources: + requests: + storage: 10Gi diff --git a/apps/frigate/release.yaml b/apps/frigate/release.yaml deleted file mode 100644 index 7928d42..0000000 --- a/apps/frigate/release.yaml +++ /dev/null @@ -1,97 +0,0 @@ -apiVersion: helm.toolkit.fluxcd.io/v2 -kind: HelmRelease -metadata: - name: frigate - namespace: frigate -spec: - chart: - spec: - chart: frigate - version: 7.x - sourceRef: - kind: HelmRepository - name: frigate - interval: 15m - releaseName: frigate - values: - image: - repository: ghcr.io/blakeblackshear/frigate - tag: stable - pullPolicy: IfNotPresent - - envFromSecrets: - - frigate-secret - - gpu: - nvidia: - enabled: true - runtimeClassName: nvidia - - config: | - mqtt: - enabled: true - host: emqx.emqx.svc.cluster.local - user: frigate - password: '{FRIGATE_MQTT_PASSWORD}' - - ffmpeg: - hwaccel_args: preset-nvidia - - go2rtc: - streams: - c200_1: - - rtsp://{FRIGATE_RTSP_USERNAME}:{FRIGATE_RTSP_PASSWORD}@192.168.18.20:554/stream1 - c200_1_sub: - - rtsp://{FRIGATE_RTSP_USERNAME}:{FRIGATE_RTSP_PASSWORD}@192.168.18.20:554/stream2 - cameras: - tapoC200_1: - enabled: true - onvif: - host: 192.168.18.20 - port: 2020 - user: '{FRIGATE_RTSP_USERNAME}' - password: '{FRIGATE_RTSP_PASSWORD}' - live: - stream_name: c200_1 - ffmpeg: - output_args: - record: preset-record-generic - inputs: - - path: rtsp://127.0.0.1:8554/c200_1?video&audio - input_args: preset-rtsp-restream - roles: - - record - - detect - - audio - - ingress: - enabled: true - annotations: - cert-manager.io/cluster-issuer: "letsencrypt-prod" - traefik.ingress.kubernetes.io/router.entrypoints: websecure - traefik.ingress.kubernetes.io/router.tls: "true" - hosts: - - host: frigate.michaelthomson.dev - paths: - - path: '/' - portName: http - tls: - - hosts: - - frigate.michaelthomson.dev - secretName: frigate-tls - - persistence: - config: - enabled: true - storageClass: longhorn - accessMode: ReadWriteOnce - size: 100Mi - media: - enabled: true - storageClass: nfs-client - accessMode: ReadWriteOnce - size: 10Gi - - resources: - limits: - nvidia.com/gpu: 1 diff --git a/apps/frigate/repository.yaml b/apps/frigate/repository.yaml deleted file mode 100644 index ade7716..0000000 --- a/apps/frigate/repository.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: source.toolkit.fluxcd.io/v1 -kind: HelmRepository -metadata: - name: frigate - namespace: frigate -spec: - interval: 15m - url: https://blakeblackshear.github.io/blakeshome-charts/ diff --git a/apps/frigate/secret.yaml b/apps/frigate/secret.yaml index 0e765ad..e6f27dd 100644 --- a/apps/frigate/secret.yaml +++ b/apps/frigate/secret.yaml @@ -5,7 +5,7 @@ stringData: FRIGATE_RTSP_PASSWORD: ENC[AES256_GCM,data:PNI3OU9QCiOEABQu6Tg=,iv:npbl8YE1iTeEA5mJOlEb6EUKhTjd7s7lRfPVCfu+OTE=,tag:PPu1JGT8PSsSfVgOk4sVgw==,type:str] kind: Secret metadata: - name: frigate-secret + name: frigate namespace: frigate sops: age: @@ -19,6 +19,6 @@ sops: -----END AGE ENCRYPTED FILE----- recipient: age1s0206tnfaaw849x5xmt95axgu8qhxzlu5ywrwz09tpt8lwpx858q089nq9 encrypted_regex: ^(data|stringData)$ - lastmodified: "2026-09-08T19:49:08Z" - mac: ENC[AES256_GCM,data:3viOyo2Qbq29GNNV7e+SacbXI/jf/LkitESACHYuwPcQZFO57J4Hg/Pk1e8lsM2Ft04Ye2L7o1Jdd8gVmPtH8EJdONWFpuv8DOgzAII/FxdDosHy5N0z8Gj8eFBCJEw4zpKKuTMoL+uG5juouWzzMnnmZ0kaz5t2dTUIkbXRDug=,iv:VaZfS84/FhkY5IJQVhbP0XUmVkBGHLMe1pnUISENQYY=,tag:sqs1pu8dThE4x9pqAsYE0g==,type:str] + lastmodified: "2026-09-09T12:12:10Z" + mac: ENC[AES256_GCM,data:mmgt9brUUt7OIbVrNDws3itVRihhpPceDSCJH/OXbgZhCChTk2i5nx7DAhzGnFik9n6jHi9+E13a7XO9wh0rUb/EMcBZhUHDwsYmPpbAUuWAzFYUXJ1MVNj0IbmGK2qoaZHKPh7WD8/5ITB0Ldv+CgAdmQ5N+QtvtfV+0IcI3XU=,iv:ZRTBFPG3Wi0Bx7yzSjAgzsxUvHe+yK4lVmesUbHMQmg=,tag:T8tT0KkMNBWdqDpGZ5m6Og==,type:str] version: 3.13.3 diff --git a/apps/frigate/service.yaml b/apps/frigate/service.yaml new file mode 100644 index 0000000..ac0770a --- /dev/null +++ b/apps/frigate/service.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + name: frigate + namespace: frigate +spec: + selector: + app: frigate + ports: + - name: http + port: 8971 + targetPort: http + - name: rtsp + port: 8554 + targetPort: rtsp + - name: webrtc-tcp + port: 8555 + targetPort: webrtc-tcp + - name: webrtc-udp + port: 8555 + protocol: UDP + targetPort: webrtc-udp