-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat][kubectl-plugin] list Ray nodes #3007
Conversation
f083cc9
to
d6c0fd5
Compare
a224f32
to
1405b6f
Compare
Overall LGTM, @chiayi can you take a look too please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor comments
memory resource.Quantity | ||
namespace string | ||
cluster string | ||
_type string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the underscore on this field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type
is a reserved keyword in Go. Lmk if there's a better name or convention.
@@ -0,0 +1,3 @@ | |||
NAMESPACE NAME CPUS GPUS TPUS MEMORY CLUSTER WORKER GROUP AGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this result not having type column?
@@ -0,0 +1,2 @@ | |||
NAMESPACE NAME CPUS GPUS TPUS MEMORY CLUSTER WORKER GROUP AGE | |||
namespace-1 pod-1 1 1 1 1Gi cluster-1 group-1 60m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this result not having type column?
return cmd | ||
} | ||
|
||
// joinLabelMap joins a map of K8s label key-val entries into a label selector string | ||
func joinLabelMap(labelMap map[string]string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved here from get_workergroup.go
since it's used by get_nodes.go
now too
memory resource.Quantity | ||
namespace string | ||
cluster string | ||
_type string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type
is a reserved keyword in Go. Lmk if there's a better name or convention.
Updated to not use test fixture files. I inlined the expected output based on this suggestion. |
with ```console kubectl ray (get|list) node[s] (NODE_NAME) \ [(-c/--ray-cluster) RAYCLUSTER] [(-n/--namespace) NAMESPACE] [(-A/--all-namespaces)] ``` ## Example Usage ```console $ kubectl ray get nodes -A NAMESPACE NAME CPUS GPUS TPUS MEMORY CLUSTER TYPE WORKER GROUP AGE explorer-guy whyme-gpuworker-worker-mqgmn 36 4 0 256Gi whyme worker gpuWorker 10d explorer-guy whyme-head-76l5c 8 0 0 16Gi whyme head headgroup 10d foundation-botox mrripvan-cpuworker-worker-lpkcs 16 0 0 64Gi mrripvan worker cpuWorker 6h6m foundation-botox mrripvan-gpuworker-worker-snkgp 16 2 0 128Gi mrripvan worker gpuWorker 6h6m foundation-botox mrripvan-head-swm6t 16 0 0 64Gi mrripvan head headgroup 6h6m $ kubectl ray get nodes -n foundation-botox NAME CPUS GPUS TPUS MEMORY CLUSTER TYPE WORKER GROUP AGE mrripvan-cpuworker-worker-lpkcs 16 0 0 64Gi mrripvan worker cpuWorker 6h6m mrripvan-gpuworker-worker-snkgp 16 2 0 128Gi mrripvan worker gpuWorker 6h6m mrripvan-head-swm6t 16 0 0 64Gi mrripvan head headgroup 6h6m $ kubectl ray get nodes -n foundation-models -c oyster-v3 NAME CPUS GPUS TPUS MEMORY CLUSTER TYPE WORKER GROUP AGE oyster-v3-cpuworker-worker-kvhz5 20 0 0 200Gi oyster-v3 worker cpuWorker 17d oyster-v3-gpuworker-worker-6s98f 200 8 0 1000Gi oyster-v3 worker gpuWorker 14d oyster-v3-head-cflmj 25 0 0 200Gi oyster-v3 head headgroup 17d oyster-v3-redis-worker-nh72b 1 0 0 12Gi oyster-v3 worker redis 17d $ kubectl ray get nodes -n foundation-models -c oyster-v3 oyster-v3-gpuworker-worker-6s98f NAME CPUS GPUS TPUS MEMORY CLUSTER TYPE WORKER GROUP AGE oyster-v3-gpuworker-worker-6s98f 200 8 0 1000Gi oyster-v3 worker gpuWorker 14d ``` Signed-off-by: David Xia <[email protected]>
with
This idea was originally described in this doc.
Checks