
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: a910-device-plugin
  namespace: kube-system
  labels:
    app: a910-device-plugin
spec:
  selector:
    matchLabels:
      app: a910-device-plugin
  template:
    metadata:
      labels:
        app: a910-device-plugin
    spec:
      nodeSelector:
        a910-device-plugin: active
      containers:
        - name: a910-device-plugin
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          image: apulis/a910-device-plugin:devel
          imagePullPolicy: IfNotPresent
          securityContext:
            # readOnlyRootFilesystem: true
            privileged: true
            # allowPrivilegeEscalation: false
          volumeMounts:
            - name: devfs
              mountPath: /dev
              # readOnly: true
            - name: sysfs
              mountPath: /sys/class/devdrv-class
              readOnly: true
            - name: kubeletsockets
              mountPath: /var/lib/kubelet/device-plugins
      volumes:
        - name: devfs
          hostPath:
            path: /dev
        - name: sysfs
          hostPath:
            path: /sys/class/devdrv-class
        - name: kubeletsockets
          hostPath:
            path: /var/lib/kubelet/device-plugins