-
Notifications
You must be signed in to change notification settings - Fork 479
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
fix operator: show resource limit values in RayCluster.Status #3118
base: master
Are you sure you want to change the base?
Conversation
9a5e726
to
6734d31
Compare
containerResource := container.Resources.Requests | ||
containerResource := container.Resources.Limits | ||
if containerResource == nil { | ||
containerResource = corev1.ResourceList{} | ||
} | ||
for name, quantity := range container.Resources.Limits { | ||
for name, quantity := range container.Resources.Requests { |
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.
the important change
@@ -841,3 +842,58 @@ func TestIsGCSFaultToleranceEnabled(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func TestCalculatePodResource(t *testing.T) { |
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.
add a test
6734d31
to
07d2c88
Compare
instead of resource request values to be consistent with [these docs]. > On the other hand CPU, GPU, and memory **requests** will be ignored by Ray. For > this reason, it is best when possible to **set resource requests equal to > resource limits**. Also make `"nvidia.com/gpu"` and `"google.com/tpu"` into shared constants. [these docs]: https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#resources:~:text=On%20the%20other%20hand%20CPU%2C%20GPU%2C%20and%20memory%20requests%20will%20be%20ignored%20by%20Ray.%20For%20this%20reason%2C%20it%20is%20best%20when%20possible%20to%20set%20resource%20requests%20equal%20to%20resource%20limits. Signed-off-by: David Xia <[email protected]>
07d2c88
to
e23b164
Compare
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.
Looks like Volcano depends on the requests not limits? Seems like this goes against KubeRay best practices?
On the other hand CPU, GPU, and memory requests will be ignored by Ray. For this reason, it is best when possible to set resource requests equal to resource limits.
Is this a breaking change that cannot be made?
instead of resource request values to be consistent with these docs.
Also make
"nvidia.com/gpu"
and"google.com/tpu"
into shared constants.Checks