generic-device-plugin.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: generic-device-plugin
  5. namespace: kube-system
  6. labels:
  7. app.kubernetes.io/name: generic-device-plugin
  8. spec:
  9. selector:
  10. matchLabels:
  11. app.kubernetes.io/name: generic-device-plugin
  12. template:
  13. metadata:
  14. labels:
  15. app.kubernetes.io/name: generic-device-plugin
  16. spec:
  17. priorityClassName: system-node-critical
  18. tolerations:
  19. - operator: "Exists"
  20. effect: "NoExecute"
  21. - operator: "Exists"
  22. effect: "NoSchedule"
  23. containers:
  24. - image: squat/generic-device-plugin
  25. args:
  26. - --device
  27. - |
  28. name: serial
  29. groups:
  30. - paths:
  31. - path: /dev/ttyUSB*
  32. - paths:
  33. - path: /dev/ttyACM*
  34. - paths:
  35. - path: /dev/tty.usb*
  36. - paths:
  37. - path: /dev/cu.*
  38. - paths:
  39. - path: /dev/cuaU*
  40. - paths:
  41. - path: /dev/rfcomm*
  42. - --device
  43. - |
  44. name: video
  45. groups:
  46. - paths:
  47. - path: /dev/video0
  48. - --device
  49. - |
  50. name: fuse
  51. groups:
  52. - count: 10
  53. paths:
  54. - path: /dev/fuse
  55. - --device
  56. - |
  57. name: audio
  58. groups:
  59. - count: 10
  60. paths:
  61. - path: /dev/snd
  62. - --device
  63. - |
  64. name: capture
  65. groups:
  66. - paths:
  67. - path: /dev/snd/controlC0
  68. - path: /dev/snd/pcmC0D0c
  69. - paths:
  70. - path: /dev/snd/controlC1
  71. mountPath: /dev/snd/controlC0
  72. - path: /dev/snd/pcmC1D0c
  73. mountPath: /dev/snd/pcmC0D0c
  74. - paths:
  75. - path: /dev/snd/controlC2
  76. mountPath: /dev/snd/controlC0
  77. - path: /dev/snd/pcmC2D0c
  78. mountPath: /dev/snd/pcmC0D0c
  79. - paths:
  80. - path: /dev/snd/controlC3
  81. mountPath: /dev/snd/controlC0
  82. - path: /dev/snd/pcmC3D0c
  83. mountPath: /dev/snd/pcmC0D0c
  84. name: generic-device-plugin
  85. resources:
  86. requests:
  87. cpu: 50m
  88. memory: 10Mi
  89. limits:
  90. cpu: 50m
  91. memory: 20Mi
  92. ports:
  93. - containerPort: 8080
  94. name: http
  95. securityContext:
  96. privileged: true
  97. volumeMounts:
  98. - name: device-plugin
  99. mountPath: /var/lib/kubelet/device-plugins
  100. - name: dev
  101. mountPath: /dev
  102. volumes:
  103. - name: device-plugin
  104. hostPath:
  105. path: /var/lib/kubelet/device-plugins
  106. - name: dev
  107. hostPath:
  108. path: /dev
  109. updateStrategy:
  110. type: RollingUpdate