apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/component: nvidia-device-plugin
    app.kubernetes.io/instance: nvidia-device-plugin-1.0.0-beta
    app.kubernetes.io/managed-by: kfctl
    app.kubernetes.io/name: nvidia-device-plugin
    app.kubernetes.io/part-of: kubeflow
    app.kubernetes.io/version: v1.0.0-beta
    kustomize.component: nvidia-device-plugin
  name: nvidia-device-plugin-daemonset
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: nvidia-device-plugin
      app.kubernetes.io/instance: nvidia-device-plugin-1.0.0-beta
      app.kubernetes.io/managed-by: kfctl
      app.kubernetes.io/name: nvidia-device-plugin
      app.kubernetes.io/part-of: kubeflow
      app.kubernetes.io/version: v1.0.0-beta
      kustomize.component: nvidia-device-plugin
  template:
    metadata:
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ""
      labels:
        app.kubernetes.io/component: nvidia-device-plugin
        app.kubernetes.io/instance: nvidia-device-plugin-1.0.0-beta
        app.kubernetes.io/managed-by: kfctl
        app.kubernetes.io/name: nvidia-device-plugin
        app.kubernetes.io/part-of: kubeflow
        app.kubernetes.io/version: v1.0.0-beta
        kustomize.component: nvidia-device-plugin
    spec:
      containers:
      - image: nvidia/k8s-device-plugin:1.0.0-beta4
        name: nvidia-device-plugin-ctr
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
        volumeMounts:
        - mountPath: /var/lib/kubelet/device-plugins
          name: device-plugin
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - effect: NoSchedule
        key: nvidia.com/gpu
        operator: Exists
      volumes:
      - hostPath:
          path: /var/lib/kubelet/device-plugins
        name: device-plugin
  updateStrategy:
    type: RollingUpdate
