Skip to content

Commit

Permalink
Fix incorrect comment in raycluster_controller.go (#3003)
Browse files Browse the repository at this point in the history
Signed-off-by: owenowenisme <mses010108@gmail.com>
  • Loading branch information
owenowenisme authored Feb 11, 2025
1 parent 9e14ba6 commit 0d848f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,7 @@ func (r *RayClusterReconciler) reconcilePods(ctx context.Context, instance *rayv
itemLength := len(headPods.Items)
for index := 0; index < itemLength; index++ {
if headPods.Items[index].Status.Phase == corev1.PodRunning || headPods.Items[index].Status.Phase == corev1.PodPending {
// Remove the healthy pod at index i from the list of pods to delete
headPods.Items[index] = headPods.Items[len(headPods.Items)-1] // replace last element with the healthy head.
headPods.Items[index] = headPods.Items[len(headPods.Items)-1] // Replace healthy pod at index i with the last element from the list of pods to delete.
headPods.Items = headPods.Items[:len(headPods.Items)-1] // Truncate slice.
itemLength--
}
Expand Down

0 comments on commit 0d848f9

Please sign in to comment.