Skip to content

Commit

Permalink
Currectly compare generation; Always assign (#599)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha authored and tamalsaha committed Oct 10, 2024
1 parent e468ff0 commit 29541f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object, tran
}

vt := kutil.VerbUnchanged
if obj.GetGeneration() != mod.GetGeneration() {
if cur.GetGeneration() != mod.GetGeneration() {
vt = kutil.VerbPatched
assign(obj, mod)
}
assign(obj, mod)
return vt, nil
}

Expand Down

0 comments on commit 29541f9

Please sign in to comment.