Skip to content

feat(ui): Enter drill-down from owners to their pods - #21

Merged
ErfanY merged 2 commits into
mainfrom
feat/drill-down
Jun 25, 2026
Merged

feat(ui): Enter drill-down from owners to their pods#21
ErfanY merged 2 commits into
mainfrom
feat/drill-down

Conversation

@ErfanY

@ErfanY ErfanY commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the top gap from the k9s readonly parity audit (4.7): Enter drill-down.

  • Enter on a Deployment / ReplicaSet / StatefulSet / DaemonSet → a Pods view scoped to that owner's pods.
  • Enter on a Node → the pods scheduled on it.
  • Leaf kinds keep prior behavior (Enter → describe; namespace → its resources).
[DRILL] deploy/api-server → Pods (2) · esc clears
 default  api-server-7d9-aaaa  [OK] Running  0s  ...
 default  api-server-7d9-bbbb  [OK] Running  0s  ...

Design

  • Live, not a snapshot: a DrillFilter on ViewRequest is applied in the projector each frame, so a rollout's new/old pods appear and disappear in real time. Deployment ownership is resolved transitively through the pod's ReplicaSet (reusing the owner chain the log fan-in already relies on); other workloads and Node match directly via ownerReferences / scheduled node.
  • The Pods title shows [DRILL] <owner> → Pods; esc pops back to the owner's list (krust has no view stack). The drill clears on any kind/namespace change.

svc → endpoints drill is deferred — it needs the Service selector, which isn't currently extracted (noted in the audit/ROADMAP).

Testing

  • make validate green (101 tests + release build)
  • new tests: projector owner-chain + node filtering; Enter→drill render integration (indicator + filtered rows)

🤖 Generated with Claude Code

ErfanY and others added 2 commits June 25, 2026 16:57
Enter on a Deployment/ReplicaSet/StatefulSet/DaemonSet now opens a Pods view
scoped to that owner's pods; Enter on a Node shows the pods scheduled on it.
Closes the top gap from the k9s readonly parity audit (4.7).

- Live filter, not a snapshot: a DrillFilter on ViewRequest is applied in the
  projector, so rollouts/new pods appear/disappear in real time. Deployment
  ownership is resolved transitively through the pod's ReplicaSet (reusing the
  owner chain the log fan-in relies on); other workloads and Node match directly
  (ownerReferences / scheduled node).
- The Pods title shows `[DRILL] <owner> → Pods`; `esc` pops back to the owner's
  list (krust has no view stack). Drill clears on any kind/namespace change.
- Leaf kinds keep the previous behavior (Enter → describe; namespace → its
  resources).

svc→endpoints drill deferred (needs the service selector, not currently
extracted) — noted in the audit/ROADMAP.

Tests: projector owner-chain/node filtering, and an Enter→drill render
integration test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The deployment→pod chain resolves transitively through each pod's ReplicaSet,
but ReplicaSets were only watched in the Logs pane — during a drill the active
kind is Pods (Table pane), so the RS were never loaded and every pod was
filtered out (zero pods).

Two-part fix:
- Watch ReplicaSets for the drilled namespace while a Deployment drill is active,
  so the chain resolves authoritatively from store state.
- Add a name-convention fallback in DrillFilter: a deployment's RS is always
  named `<deploy>-<pod-template-hash>` (hash has no `-`), so pods match
  immediately even before the RS watch populates or if RS are RBAC-denied. The
  no-`-` check keeps `web` from matching `web-api`'s ReplicaSets.

Test: projector deployment drill now covers a pod whose RS is absent from the
store (name-fallback path).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ErfanY
ErfanY merged commit 3b0992b into main Jun 25, 2026
1 check passed
@ErfanY
ErfanY deleted the feat/drill-down branch June 25, 2026 15:47
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.

1 participant