Skip to content

Commit

Permalink
Do not DeepCopy resources in NewRebasedResource
Browse files Browse the repository at this point in the history
We already deep copy resources when rebasing, so need to deep copy them in the rebased resource constructor

Signed-off-by: Praveen Rewar <[email protected]>
  • Loading branch information
praveenrewar committed Jul 8, 2023
1 parent d300684 commit 0473c1e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/kapp/diff/rebased_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ func NewRebasedResource(existingRes, newRes ctlres.Resource, mods []ctlres.Resou
panic("Expected either existingRes or newRes be non-nil")
}

if existingRes != nil {
existingRes = existingRes.DeepCopy()
}
if newRes != nil {
newRes = newRes.DeepCopy()
}

return RebasedResource{existingRes: existingRes, newRes: newRes, mods: mods}
}

Expand Down

0 comments on commit 0473c1e

Please sign in to comment.