apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: edge-device-plugin-daemonset
  namespace: kube-system 
spec:
  selector:
    matchLabels:
      name: edge-device-plugin-ds
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ""
      labels:
        name: edge-device-plugin-ds
    spec:
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - key: coral.ai/tpu
        operator: Exists
        effect: NoSchedule
      - key: intel.com/vpu
        operator: Exists
        effect: NoSchedule
      - key: broadcom.com/gpu
        operator: Exists
        effect: NoSchedule
      priorityClassName: "system-node-critical"
      containers:
      - image:   ghcr.io/h-s-c/edge-device-plugin:latest
        name: edge-device-plugin
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop: ["ALL"]
        volumeMounts:
          - name: device-plugin
            mountPath: /var/lib/kubelet/device-plugins
      volumes:
        - name: device-plugin
          hostPath:
            path: /var/lib/kubelet/device-plugins