diff --git a/ray-operator/controllers/ray/common/association.go b/ray-operator/controllers/ray/common/association.go index 3575f7d2fb3..d54cf4701a2 100644 --- a/ray-operator/controllers/ray/common/association.go +++ b/ray-operator/controllers/ray/common/association.go @@ -74,7 +74,7 @@ func RayClusterWorkerPodsAssociationOptions(instance *rayv1.RayCluster) Associat } } -func RayClusterRedisPodAssociationOptions(instance *rayv1.RayCluster) AssociationOptions { +func RayClusterRedisCleanupPodAssociationOptions(instance *rayv1.RayCluster) AssociationOptions { return AssociationOptions{ client.InNamespace(instance.Namespace), client.MatchingLabels{ diff --git a/ray-operator/controllers/ray/raycluster_controller.go b/ray-operator/controllers/ray/raycluster_controller.go index 5df1a22abb7..3b1ec20790f 100644 --- a/ray-operator/controllers/ray/raycluster_controller.go +++ b/ray-operator/controllers/ray/raycluster_controller.go @@ -249,7 +249,7 @@ func (r *RayClusterReconciler) rayClusterReconcile(ctx context.Context, request // We can start the Redis cleanup process now because the head Pod has been terminated. redisCleanupJobs := batchv1.JobList{} - if err := r.List(ctx, &redisCleanupJobs, common.RayClusterRedisPodAssociationOptions(instance).ToListOptions()...); err != nil { + if err := r.List(ctx, &redisCleanupJobs, common.RayClusterRedisCleanupPodAssociationOptions(instance).ToListOptions()...); err != nil { return ctrl.Result{RequeueAfter: DefaultRequeueDuration}, err }