Skip to content

Commit

Permalink
Update mockkubeapiserver/patchresource.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tomas Aschan <1550920+tomasaschan@users.noreply.github.com>
  • Loading branch information
justinsb and tomasaschan committed Jun 8, 2024
1 parent 507f400 commit 8bee494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mockkubeapiserver/patchresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error {
klog.Infof("skipping write, object not changed")
return req.writeResponse(existingObj)
} else {
bumpGeneration := !reflect.DeepEqual(existingObj.Object["spec"], updated.Object["spec"])
if bumpGeneration {
specIsSame := reflect.DeepEqual(existingObj.Object["spec"], updated.Object["spec"])
if !specIsSame {
generation := updated.GetGeneration()
generation++
updated.SetGeneration(generation)
Expand Down

0 comments on commit 8bee494

Please sign in to comment.