Files
krust/docs
Erfan YousefiandClaude Opus 4.8 1389b060ca feat(metrics): per-pod CPU/MEM usage columns in the Pods table (Phase 4.2)
Builds on the cluster [USE] pulse row with the per-pod view operators actually
want: live usage per pod, not just the aggregate.

- ResourceProvider::pod_metrics reads metrics.k8s.io PodMetrics (scoped to the
  active namespace or cluster-wide), summing usage across each pod's containers.
- App caches it as (namespace,name) -> (cpu_m, mem_b) per context+namespace,
  refreshed lazily alongside node metrics (15s TTL).
- The Pods table swaps its Summary column for CPU and MEM (live usage), looked
  up per visible row (O(viewport)); other kinds are unchanged. When no
  metrics-server: cells show "-" and the title flags "metrics-server n/a".
- `--metrics` probe now also reports pod-metrics counts.

Verified on a real metrics-server cluster: 45 nodes / 821 pods reporting live
usage; graceful fallback on kwok. Tests: columns render with seeded usage, and
the unavailable note.

Validation: fmt, check, test (87 passed / 4 ignored), release build all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 00:54:08 +02:00
..