blakeblackshear / blakeshome-charts

Repo for helm charts
48 stars 62 forks source link

Error with creating path when using PCI Coral on k3s #35

Closed ryanm101 closed 2 years ago

ryanm101 commented 2 years ago

I get the following error when i deploy on an Intel Nuc running k3s, I've a m2 Coral that is on path /dev/apex_0 on the host

Error: failed to create containerd task: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:88: creating device nodes caused: mkdir /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/frigate/rootfs/dev/bus/usb: not a directory: unknown

My Values.yaml, I've tried with and without the security context set.

strategyType: Recreate

image:
  repository: blakeblackshear/frigate
  tag: 0.10.1-amd64
  pullPolicy: IfNotPresent

imagePullSecrets: []

env: {}
  # TZ: UTC

envFromSecrets: []

coral:
  enabled: true
  hostPath: /dev/apex_0

gpu:
  nvidia:
    enabled: false
    runtimeClassName:
extraVolumes: []
extraVolumeMounts: []
shmSize: 1Gi
nameOverride: ""
fullnameOverride: ""

config: |
  mqtt:
    host: mqtt.local
    port: 1883
    topic_prefix: frigate
    client_id: frigate
    user: homeassistant
    password: password
    stats_interval: 60

  detectors:
    coral:
      type: edgetpu
      device: pci:0
    cpu1:
      type: cpu

  ffmpeg:
    hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p

  cameras:
    frontdoor:
      ffmpeg:
        inputs:
          - path: rtsp://192.168.x.x/11
            roles:
              - record
              - rtmp
          - path: rtsp://192.168.x.x/12
            roles:
              - detect
      detect:
        fps: 5
        width: 640
        height: 360
      motion:
        mask:
        - 0,360,66,360,62,127,0,0
        - 608,0,615,32,361,34,363,0
      zones:
        front_door:
          coordinates: 229,95,393,360,97,360,86,0
        front_approach:
          coordinates: 453,360,586,282,399,133,254,47,184,38,248,81,397,360

probes:
  liveness:
    enabled: true
    initialDelaySeconds: 30
    failureThreshold: 5
    timeoutSeconds: 10
  readiness:
    enabled: true
    initialDelaySeconds: 30
    failureThreshold: 5
    timeoutSeconds: 10
  startup:
    enabled: false
    failureThreshold: 30
    periodSeconds: 10

service:
  type: ClusterIP
  port: 5000
  annotations: {}
  labels: {}
  loadBalancerIP:

ingress:
  enabled: false
  annotations: {}
  hosts:
    - host: nvr2.local
      paths:
        - '/'
  tls: []

persistence:
  data:
    enabled: false
    # storageClass: "-"
    accessMode: ReadWriteOnce
    size: 10Gi
    skipuninstall: false

resources: {}

# -- Set Security Context
securityContext:
  capabilities:
    drop:
      - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000
  privileged: true

nodeSelector: {}
tolerations: []
affinity: {}
podAnnotations: {}

Editing https://github.com/blakeblackshear/blakeshome-charts/blob/master/charts/frigate/templates/deployment.yaml#L100 to /dev/apex_0 gets the pod to start