skip reflect work status when resource has empty status

Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
changzhen 2022-05-07 11:02:22 +08:00
parent 810048fe89
commit d0dadb282a
1 changed files with 4 additions and 0 deletions

View File

@ -283,6 +283,10 @@ func (c *WorkStatusController) reflectStatus(work *workv1alpha1.Work, clusterObj
clusterObj.GetKind(), clusterObj.GetNamespace(), clusterObj.GetName(), err)
}
if statusRaw == nil {
return nil
}
identifier, err := c.buildStatusIdentifier(work, clusterObj)
if err != nil {
return err