Files
substrate/LICENSES
Tim Bai 6afafed093 feat(kubectl-ate): implement kubectl ate top workers command (#515) (#516)
##  Feature Implementation
This PR implements the `kubectl ate top workers` command in
`kubectl-ate` to display real-time CPU and Memory resource utilization
for worker pods.

###  Changes Included:
- **Command Structure**: Added `top.go` and `top_workers.go` under
`cmd/kubectl-ate/internal/cmd/`.
- **Supported Flags**:
- `-n, --namespace <ns>`: Scope output to a specific Kubernetes
namespace.
- `-a, --atespace <space>`: Filter worker pods hosting actors in a
specific atespace.
  - `-l, --selector <labels>`: Filter by worker pool labels.
  - `-o, --output table|json|yaml`: Output format option.
- **Metrics Client**: Added `NewMetricsClientset` to connect to K8s
`metrics.k8s.io/v1beta1`.
- **Data Join & Fallback**: Joined Substrate `ListWorkers` gRPC RPC with
K8s `PodMetrics`, gracefully displaying `metrics unavailable` if
`metrics-server` is missing/unavailable.
- **Printer & Unit Tests**: Implemented table, JSON, and YAML printers
and comprehensive unit tests.

Closes #515
2026-07-24 11:57:18 -07:00
..