mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-05-28 04:35:50 -04:00
Add a Node-Exclusive ResourceSlices section to `kubectl describe node`
that displays DRA ResourceSlices assigned exclusively to the node.
Key design decisions per reviewer feedback:
1. Uses indexed field selector (spec.nodeName) for O(1) query performance
instead of fetching all slices cluster-wide. This is critical for
large clusters with thousands of ResourceSlices.
2. Shows only node-exclusive slices (where spec.NodeName == thisNode).
Does NOT show AllNodes, NodeSelector, or PerDeviceNodeSelection slices
as these could number in the thousands and aren't node-specific.
3. Aggregates by driver/pool instead of listing individual slices:
- Shows: Driver, Pool, Slices count, Devices count
- More concise and useful output
4. Caps output at 10 pools with "...and X more pools" message,
following the existing formatEndpointSlices pattern.
Example output:
Node-Exclusive ResourceSlices:
Driver Pool Slices Devices
------ ---- ------ -------
nvidia.com/gpu gpu-pool 2 8
intel.com/qat qat-pool 1 4
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Kubernetes-commit: 4c4014304202b0721509c2ec129035884bcd3770
|
||
|---|---|---|
| .. | ||
| describe.go | ||
| describe_test.go | ||
| interface.go | ||