feat(kubectl-ate): implement kubectl ate top workers command (#515) - #516
Merged
Merged
Conversation
Tim Bai (baizhenyu)
force-pushed
the
worker-top
branch
3 times, most recently
from
July 24, 2026 17:30
f7085f2 to
45ed90e
Compare
Tim Bai (baizhenyu)
force-pushed
the
worker-top
branch
from
July 24, 2026 18:19
45ed90e to
b3f3c97
Compare
| assignedActor := "<none>" | ||
| if wass := w.GetAssignment(); wass != nil && wass.GetActor() != nil { | ||
| status = "ASSIGNED" | ||
| if wass.GetActorTemplate() != nil && wass.GetActorTemplate().GetNamespace() != "" { |
Collaborator
There was a problem hiding this comment.
Hmm I think in this system anywhere a worker has assignment - the actor and actorTemplate is impossible to be empty at the same time. So the rest else if and else are never reached.
Julian Gutierrez Oschmann (@juli4n) is that correct?
Collaborator
There was a problem hiding this comment.
That's correct.
Collaborator
Author
There was a problem hiding this comment.
Thanks for the confirmation. I just cleaned up the unreachable cases.
…ubstrate#515) Implement 'kubectl ate top workers' command in kubectl-ate to display live CPU and Memory resource utilization for Substrate worker pods. - Add top parent command and top workers subcommand with flags: - -n, --namespace: Scope to specific K8s namespace - -a, --atespace: Filter by assigned actor atespace - -l, --selector: Filter by worker pool labels - -o, --output: Output format (table, json, yaml) - Integrate Kubernetes Metrics API (metrics.k8s.io/v1beta1) - Join Substrate ListWorkers RPC responses with K8s PodMetrics - Handle metrics-server unavailability gracefully - Add comprehensive printer and CLI unit tests Closes agent-substrate#515
Tim Bai (baizhenyu)
force-pushed
the
worker-top
branch
from
July 24, 2026 18:46
b3f3c97 to
5d19677
Compare
Haven Xia (HavenXia)
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Feature Implementation
This PR implements the
kubectl ate top workerscommand inkubectl-ateto display real-time CPU and Memory resource utilization for worker pods.Changes Included:
top.goandtop_workers.goundercmd/kubectl-ate/internal/cmd/.-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.NewMetricsClientsetto connect to K8smetrics.k8s.io/v1beta1.ListWorkersgRPC RPC with K8sPodMetrics, gracefully displayingmetrics unavailableifmetrics-serveris missing/unavailable.Closes #515