Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#6 from vivek-koppuru/fix-crs
Browse files Browse the repository at this point in the history
Bug fix for clusterresourceset apply
  • Loading branch information
abhay-krishna authored Dec 8, 2022
2 parents cd9a5cd + 4d2bfbb commit a0456bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exp/addons/internal/controllers/clusterresourceset_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ func (r *reconcileStrategyScope) apply(ctx context.Context, c client.Client, obj
}

patch := client.MergeFrom(currentObj.DeepCopy())
// metadata.ResourceVersion needs to be set to avoid webhook errors in applying
obj.SetResourceVersion(currentObj.GetResourceVersion())
if err = c.Patch(ctx, obj, patch); err != nil {
return errors.Wrapf(
err,
Expand Down

0 comments on commit a0456bf

Please sign in to comment.