---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: amdgpu-device-plugin-daemonset
  namespace: kube-system
  annotations:
    keel.sh/policy: minor
    keel.sh/trigger: poll
    keel.sh/pollSchedule: "@weekly"
spec:
  selector:
    matchLabels:
      name: amdgpu-dp-ds
  template:
    metadata:
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ""
      labels:
        name: amdgpu-dp-ds
    spec:
      nodeSelector:
        feature.node.kubernetes.io/pci-0300_1002.present: "true"
      tolerations:
        - key: CriticalAddonsOnly
          operator: Exists
      containers:
        - name: amdgpu-dp-cntr
          image: rocm/k8s-device-plugin
          resources:
            requests:
              memory: "128Mi"
              cpu: "0.25"
            limits:
              memory: "1024Mi"
              cpu: "1.00"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
          volumeMounts:
            - name: dp
              mountPath: /var/lib/kubelet/device-plugins
            - name: sys
              mountPath: /sys
      volumes:
        - name: dp
          hostPath:
            path: /var/lib/kubelet/device-plugins
        - name: sys
          hostPath:
            path: /sys
