Merge pull request #4453 from chaosi-zju/dev

execute InterpretHealth even if statusRaw is nil
This commit is contained in:
karmada-bot 2023-12-20 16:45:15 +08:00 committed by GitHub
commit c6b2adaafc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -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()) 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 var resourceHealth workv1alpha1.ResourceHealth
// When an unregistered resource kind is requested with the ResourceInterpreter, // When an unregistered resource kind is requested with the ResourceInterpreter,
// the interpreter will return an error, we treat its health status as Unknown. // the interpreter will return an error, we treat its health status as Unknown.