Skip to content

Commit

Permalink
optimize object apply logic.
Browse files Browse the repository at this point in the history
Signed-off-by: qicz <qiczzhu@gmail.com>
  • Loading branch information
qicz committed Feb 15, 2023
1 parent 7419603 commit e368675
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (u *UpdateHandler) apply(update Update) {
return nil
}

newObj.SetResourceVersion(obj.GetResourceVersion())
newObj.SetUID(obj.GetUID())
return u.client.Status().Update(context.Background(), newObj)
}); err != nil {
u.log.Error(err, "unable to update status", "name", update.NamespacedName.Name,
Expand Down

0 comments on commit e368675

Please sign in to comment.