Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
bugfix: deepcopy obj before using MergeFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhu committed May 10, 2021
1 parent c9a62ff commit 9d988f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/sync/dispatch/unmanaged.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (d *unmanagedDispatcherImpl) RemoveManagedLabel(clusterName string, cluster

// Avoid mutating the resource in the informer cache
updateObj := clusterObj.DeepCopy()
patch := runtimeclient.MergeFrom(updateObj)
patch := runtimeclient.MergeFrom(updateObj.DeepCopy())

util.RemoveManagedLabel(updateObj)

Expand Down

0 comments on commit 9d988f5

Please sign in to comment.