XRay: Add Node graph displaying scheduled Pods with PVC→PV expansion #3679
+315
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Node-centric XRay view. Starting from a Node, K9s lists all Pods scheduled on it (cluster-wide) and, via the Pod renderer, expands related resources including PVCs and their bound PVs. This makes it easy to answer “which PVs are in use on this node?” without jumping between panels.
Motivation
What’s changed
internal/xray/node.go: renders Node → Pods using aspec.nodeName=<node>field selector; reuses Pod XRay to expand containers, ServiceAccount, PVCs, and bound PVs.internal/model/registry.go: enablesTreeRenderer: new(xray.Node)forclient.NodeGVR.:xray node:internal/view/command.go: addsclient.NodeGVRto allowed XRay resources.internal/xray/pod.go: when a Pod mounts a PVC and the PVC is bound, the backing PV appears under that PVC node.internal/xray/node_test.go:TestNodeRenderTestNodeRender_PodPVCExpandsToPVTestNodeRender_ErrorOnBadInputTypeTestNodeRender_ErrorWhenNoParentInContextTestNodeRender_ErrorWhenNoFactoryInContextTestNodeRender_NoPodsFoundinternal/xray/pod_test.go:TestPodPVCExpandsToPV(confirms PVC→PV expansion from Pod)