---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: intel-gpu-plugin
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: intel-gpu-plugin
  template:
    metadata:
      labels:
        app: intel-gpu-plugin
    spec:
      nodeSelector:
        kubernetes.io/arch: amd64
      containers:
        - name: intel-gpu-plugin
          image: intel/intel-gpu-plugin:0.23.0
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          volumeMounts:
            - name: devfs
              mountPath: /dev/dri
              readOnly: true
            - name: sysfs
              mountPath: /sys/class/drm
              readOnly: true
            - name: kubeletsockets
              mountPath: /var/lib/kubelet/device-plugins
          securityContext:
            readOnlyRootFilesystem: true
      automountServiceAccountToken: false
      volumes:
        - name: devfs
          hostPath:
            path: /dev/dri
        - name: sysfs
          hostPath:
            path: /sys/class/drm
        - name: kubeletsockets
          hostPath:
            path: /var/lib/kubelet/device-plugins
