execute InterpretHealth even if statusRaw is nil
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
This commit is contained in:
parent
33c98a4e44
commit
56e0d8c9e6
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue