From ae880c4905909c58ec2681f59a65b250eec9fd19 Mon Sep 17 00:00:00 2001 From: fscnick <6858627+fscnick@users.noreply.github.com> Date: Thu, 16 Jan 2025 02:00:33 +0800 Subject: [PATCH] [RayCluster][Refactor] use RayClusterAllPodsAssociationOptions instead (#2756) Signed-off-by: fscnick --- ray-operator/controllers/ray/raycluster_controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ray-operator/controllers/ray/raycluster_controller.go b/ray-operator/controllers/ray/raycluster_controller.go index b231db5b4e..afc2ce101a 100644 --- a/ray-operator/controllers/ray/raycluster_controller.go +++ b/ray-operator/controllers/ray/raycluster_controller.go @@ -1331,8 +1331,7 @@ func (r *RayClusterReconciler) calculateStatus(ctx context.Context, instance *ra newInstance.Status.ObservedGeneration = newInstance.ObjectMeta.Generation runtimePods := corev1.PodList{} - filterLabels := client.MatchingLabels{utils.RayClusterLabelKey: newInstance.Name} - if err := r.List(ctx, &runtimePods, client.InNamespace(newInstance.Namespace), filterLabels); err != nil { + if err := r.List(ctx, &runtimePods, common.RayClusterAllPodsAssociationOptions(newInstance).ToListOptions()...); err != nil { return nil, err }