device-plugin.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. apiVersion: extensions/v1beta1
  2. kind: DaemonSet
  3. metadata:
  4. name: rdma-sriov-dp-ds
  5. namespace: kube-system
  6. spec:
  7. template:
  8. metadata:
  9. # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler
  10. # reserves resources for critical add-on pods so that they can be rescheduled after
  11. # a failure. This annotation works in tandem with the toleration below.
  12. annotations:
  13. scheduler.alpha.kubernetes.io/critical-pod: ""
  14. labels:
  15. name: rdma-sriov-dp-ds
  16. spec:
  17. hostNetwork: true
  18. tolerations:
  19. # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode.
  20. # This, along with the annotation above marks this pod as a critical add-on.
  21. - key: CriticalAddonsOnly
  22. operator: Exists
  23. containers:
  24. - image: rdma/k8s-rdma-sriov-dev-plugin
  25. name: k8s-rdma-sriov-dp-ds
  26. imagePullPolicy: IfNotPresent
  27. securityContext:
  28. privileged: true
  29. volumeMounts:
  30. - name: device-plugin
  31. mountPath: /var/lib/kubelet/device-plugins
  32. - name: config
  33. mountPath: /k8s-rdma-sriov-dev-plugin
  34. volumes:
  35. - name: device-plugin
  36. hostPath:
  37. path: /var/lib/kubelet/device-plugins
  38. - name: config
  39. configMap:
  40. name: rdma-devices
  41. items:
  42. - key: config.json
  43. path: config.json