kubectl/pkg/describe
Carlos Eduardo Arango Gutierrez 767a91111a kubectl: Add ResourceSlices to describe node with O(1) query
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
2026-02-04 12:47:29 +01:00
..
describe.go kubectl: Add ResourceSlices to describe node with O(1) query 2026-02-04 12:47:29 +01:00
describe_test.go kubectl: Add ResourceSlices to describe node with O(1) query 2026-02-04 12:47:29 +01:00
interface.go Add --chunk-size support to kubectl describe 2021-04-20 11:24:35 -07:00