Skip to content

Comments

feat(usb): NodeUSBDevice controller#1913

Open
danilrwx wants to merge 10 commits intofeat/dra-usbipfrom
feat/node-usb-device
Open

feat(usb): NodeUSBDevice controller#1913
danilrwx wants to merge 10 commits intofeat/dra-usbipfrom
feat/node-usb-device

Conversation

@danilrwx
Copy link
Contributor

@danilrwx danilrwx commented Jan 23, 2026

Description

Added a new CRD NodeUSBDevice and controller for managing USB devices at the node level in the cluster.

Why do we need it, and what problem does it solve?

The DRA (Dynamic Resource Allocation) system automatically discovers USB devices on cluster nodes and creates ResourceSlice resources. However, there was no convenient mechanism for managing these devices at the Kubernetes level:

  • No way to see all USB devices discovered on cluster nodes in a unified view
  • No ability to assign devices to specific namespaces for use in virtual machines
  • No automatic synchronization between devices on nodes and USBDevice resources in namespaces

Solution:

NodeUSBDevice provides an abstraction layer between physical USB devices on nodes (represented via ResourceSlice) and logical USBDevice resources in namespaces. This enables:

  • Administrators to see all available USB devices in the cluster via kubectl get nodeusbdevices
  • Assigning devices to specific namespaces by setting spec.assignedNamespace
  • Automatic creation of USBDevice resources in namespaces upon assignment, simplifying device usage in virtual machines

What is the expected result?

  • NodeUSBDevice resources are automatically created for all USB devices discovered by the DRA system
  • The Ready condition correctly reflects device presence on the node
  • When assignedNamespace is set, a USBDevice is automatically created in the specified namespace
  • When assignedNamespace is changed or cleared, corresponding USBDevice resources are correctly deleted
  • All device attributes (vendorID, productID, manufacturer, product, etc.) are correctly synchronized from ResourceSlice

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: api
type: feature
summary: Add NodeUSBDevice and USBDevice.

@danilrwx danilrwx changed the base branch from main to feat/dra-usbip January 23, 2026 16:52
@danilrwx danilrwx force-pushed the feat/node-usb-device branch from 29be831 to b276ce0 Compare January 23, 2026 16:57
@danilrwx danilrwx changed the base branch from feat/dra-usbip to feat/dra-hotplug-claims January 23, 2026 16:57
@danilrwx danilrwx changed the base branch from feat/dra-hotplug-claims to feat/dra January 23, 2026 16:57
@danilrwx danilrwx changed the base branch from feat/dra to feat/dra-usbip January 23, 2026 16:58
@danilrwx danilrwx force-pushed the feat/node-usb-device branch from b276ce0 to 9b7436f Compare January 23, 2026 16:58
@danilrwx danilrwx added this to the v1.6.0 milestone Jan 26, 2026
@danilrwx danilrwx force-pushed the feat/node-usb-device branch 7 times, most recently from 127101a to 7dadda9 Compare February 2, 2026 15:36
@danilrwx danilrwx force-pushed the feat/node-usb-device branch 5 times, most recently from fc3f7d8 to 3a040c2 Compare February 4, 2026 17:39
@yaroslavborbat yaroslavborbat force-pushed the feat/dra-usbip branch 7 times, most recently from dd2ef4f to fce3c4d Compare February 6, 2026 14:34
@danilrwx danilrwx force-pushed the feat/node-usb-device branch 4 times, most recently from a3a9f61 to bdca1c1 Compare February 9, 2026 16:36
@danilrwx danilrwx force-pushed the feat/node-usb-device branch from 60c1742 to ef60a2f Compare February 19, 2026 13:05
@z9r5 z9r5 requested a review from prismagod February 19, 2026 13:39
@danilrwx danilrwx force-pushed the feat/node-usb-device branch 3 times, most recently from f2929ed to 6691b27 Compare February 19, 2026 19:09
@danilrwx danilrwx force-pushed the feat/node-usb-device branch 3 times, most recently from 757311d to 2307fc7 Compare February 20, 2026 11:20
@danilrwx danilrwx force-pushed the feat/node-usb-device branch from efbbba5 to ffc5b8a Compare February 20, 2026 12:09
@danilrwx danilrwx force-pushed the feat/node-usb-device branch from ffc5b8a to 149b4b3 Compare February 20, 2026 13:29
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>

fix

Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>

fixfix

Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
@danilrwx danilrwx force-pushed the feat/node-usb-device branch from 16bc339 to a3ae114 Compare February 20, 2026 15:17
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants