Skip to content

Commit 4e912b9

Browse files
authored
[RayService] Use original ClusterIP for new head service (#2343)
Signed-off-by: kaihsun <[email protected]>
1 parent a69252e commit 4e912b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ray-operator/controllers/ray/rayservice_controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,9 +989,7 @@ func (r *RayServiceReconciler) reconcileServices(ctx context.Context, rayService
989989
// ClusterIP is immutable. Starting from Kubernetes v1.21.5, if the new service does not specify a ClusterIP,
990990
// Kubernetes will assign the ClusterIP of the old service to the new one. However, to maintain compatibility
991991
// with older versions of Kubernetes, we need to assign the ClusterIP here.
992-
if newSvc.Spec.ClusterIP == "" {
993-
newSvc.Spec.ClusterIP = oldSvc.Spec.ClusterIP
994-
}
992+
newSvc.Spec.ClusterIP = oldSvc.Spec.ClusterIP
995993

996994
// TODO (kevin85421): Consider not only the updates of the Spec but also the ObjectMeta.
997995
oldSvc.Spec = *newSvc.Spec.DeepCopy()

0 commit comments

Comments
 (0)