ray-project / kuberay

A toolkit to run Ray applications on Kubernetes
Apache License 2.0
974 stars 330 forks source link

Add HeadInfo.Ready status for RayCluster #2115

Open Yicheng-Lu-llll opened 2 months ago

Yicheng-Lu-llll commented 2 months ago

Why are these changes needed?

As explained here: https://github.com/ray-project/kuberay/pull/1930#pullrequestreview-1978124073, we need to add a field in HeadInfo to indicate whether the head Pod is ready or not.

Related issue number

Checks

# 1. Create a RayCluster
kubectl apply -f /home/ubuntu/kuberay/ray-operator/config/samples/ray-cluster.complete.yaml

# 2. When head Pod is not ready.
kubectl get pod
# raycluster-complete-head-t24sk                 0/1     Running    0          2s
kubectl describe raycluster
# Head:
# Pod IP:             10.244.0.8
# Ready:              false
# Service IP:         10.96.68.134
# Service Name:       raycluster-complete-head-svc

# 3. When head Pod is ready.
kubectl get pod
# raycluster-complete-head-t24sk                 1/1     Running   0          69s
kubectl describe raycluster
# Head:
# Pod IP:             10.244.0.8
# Ready:              true
# Service IP:         10.96.68.134
# Service Name:       raycluster-complete-head-svc