-
Notifications
You must be signed in to change notification settings - Fork 426
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
[RayService] Add New Status: NumServeEndpoints #1901
[RayService] Add New Status: NumServeEndpoints #1901
Conversation
acfbf4d
to
377d18f
Compare
588139b
to
8110ea8
Compare
@@ -71,6 +71,9 @@ type RayServiceStatuses struct { | |||
PendingServiceStatus RayServiceStatus `json:"pendingServiceStatus,omitempty"` | |||
// ServiceStatus indicates the current RayService status. | |||
ServiceStatus ServiceStatus `json:"serviceStatus,omitempty"` | |||
// ActiveServingRayPods indicates the number of Ray Pods that are actively serving or have been selected by the serve service. | |||
// Ray Pods without a proxy actor or those that are unhealthy will not be counted. | |||
ActiveServingRayPods int32 `json:"ActiveServingRayPods,omitempty"` |
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.
NumServeEndpoints
d3690bc
to
4680dd6
Compare
Signed-off-by: Yicheng-Lu-llll <[email protected]>
f1f67ab
to
0b3cce2
Compare
} | ||
|
||
numServeEndpoints := 0 | ||
for _, subset := range serveEndPoints.Subsets { |
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.
I am not familiar with endpoints. What is Subsets
?
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.
These links explain it: https://pkg.go.dev/k8s.io/api/core/v1#Endpoints
https://pkg.go.dev/k8s.io/api/core/v1#EndpointSubset
@@ -224,6 +229,25 @@ func (r *RayServiceReconciler) Reconcile(ctx context.Context, request ctrl.Reque | |||
return ctrl.Result{RequeueAfter: ServiceDefaultRequeueDuration}, nil | |||
} | |||
|
|||
func (r *RayServiceReconciler) calculateStatus(ctx context.Context, rayServiceInstance *rayv1.RayService, rayClusterInstance *rayv1.RayCluster) error { | |||
serveSvc, err := common.BuildServeServiceForRayService(ctx, *rayServiceInstance, *rayClusterInstance) |
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.
TODO: Associate RayService and its K8s service in a smarter way.
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.
cc @rueian
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Why are these changes needed?
This PR adds the
NumServeEndpoints
field to the RayService's status. TheNumServeEndpoints
field indicates the number of active serving Ray Pods or the number of Ray Pods selected by the serve service. If a Ray Pod has no proxy actor or is unhealthy, it will not be counted.This new field can help users and CI tests determine how many Ray Pods are capable of serving, making debugging much easier. This is crucial because, with the high availability feature of RayService, even if some worker Pods become unhealthy, it is hard to tell since everything appears to work just fine on the surface.
Related issue number
Checks