---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: amdgpu-device-plugin
  namespace: kube-system
spec:
  selector:
    matchLabels:
      name: amdgpu-device-plugin
  template:
    metadata:
      labels:
        name: amdgpu-device-plugin
    spec:
      priorityClassName: system-node-critical
      tolerations:
        - key: CriticalAddonsOnly
          operator: Exists
      containers:
        - image: docker.io/rocm/k8s-device-plugin:1.18.0
          name: amdgpu-dp-cntr-health
          workingDir: /root
          command: ["./k8s-device-plugin"]
          args:
            - "-logtostderr=true"
            - "-stderrthreshold=INFO"
            - "-v=5"
            - "-pulse=2"
          securityContext:
            privileged: true
            capabilities:
              drop: ["ALL"]
          volumeMounts:
            - name: dp
              mountPath: /var/lib/kubelet/device-plugins
            - name: sys
              mountPath: /sys
            - name: dev
              mountPath: /dev
      volumes:
        - name: dp
          hostPath:
            path: /var/lib/kubelet/device-plugins
        - name: sys
          hostPath:
            path: /sys
        - name: dev
          hostPath:
            path: /dev
