From 56e0d8c9e6f17827c96c0c63d7f78b42e4d90857 Mon Sep 17 00:00:00 2001 From: chaosi-zju Date: Wed, 20 Dec 2023 15:44:39 +0800 Subject: [PATCH] execute InterpretHealth even if statusRaw is nil Signed-off-by: chaosi-zju --- pkg/controllers/status/work_status_controller.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/controllers/status/work_status_controller.go b/pkg/controllers/status/work_status_controller.go index c79d8aaf9f26..17365f724fa9 100644 --- a/pkg/controllers/status/work_status_controller.go +++ b/pkg/controllers/status/work_status_controller.go @@ -312,10 +312,6 @@ func (c *WorkStatusController) reflectStatus(work *workv1alpha1.Work, clusterObj } c.EventRecorder.Eventf(work, corev1.EventTypeNormal, events.EventReasonReflectStatusSucceed, "Reflect status for object(%s/%s/%s) succeed.", clusterObj.GetKind(), clusterObj.GetNamespace(), clusterObj.GetName()) - if statusRaw == nil { - return nil - } - var resourceHealth workv1alpha1.ResourceHealth // When an unregistered resource kind is requested with the ResourceInterpreter, // the interpreter will return an error, we treat its health status as Unknown.