Merge pull request #1733 from XiShanYongYe-Chang/skip-reflect-status

Skip reflect work status when resource has empty status
This commit is contained in:
karmada-bot 2022-05-11 10:20:33 +08:00 committed by GitHub
commit b2ebfb6036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) clusterObj.GetKind(), clusterObj.GetNamespace(), clusterObj.GetName(), err)
} }
if statusRaw == nil {
return nil
}
identifier, err := c.buildStatusIdentifier(work, clusterObj) identifier, err := c.buildStatusIdentifier(work, clusterObj)
if err != nil { if err != nil {
return err return err