Skip to content

Commit

Permalink
v0.29.x: Fix bug in skv2 UpdateStatusImmutable (#471)
Browse files Browse the repository at this point in the history
* update

* add changelog
  • Loading branch information
tjons authored Aug 8, 2023
1 parent 1706bc0 commit f9d6f9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/v0.29.11/copy-metadata-on-status-upsert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
- type: NON_USER_FACING
description: >
"Copy metadata from the existing object to the upserted object when upserting a status."
2 changes: 2 additions & 0 deletions pkg/controllerutils/upsert.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ func UpdateStatusImmutable(

// https://github.com/solo-io/skv2/issues/344
copyOfObj.SetUID(existing.GetUID())
copyOfObj.SetCreationTimestamp(existing.GetCreationTimestamp())
copyOfObj.SetResourceVersion(existing.GetResourceVersion())

return update(ctx, c, copyOfObj)
}
Expand Down

0 comments on commit f9d6f9b

Please sign in to comment.