The fake client Update() should not store omit empty fields #2477
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/support
Categorizes issue or PR as a support question.
The update deserializes the json from the old object into the new object, but if the old object didn't have the json keys to override the new object, the new object keeps its values:
The relevant code is here:
https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/client/fake/client.go#L1025
See #2476 for a test case that points out the bug.
The text was updated successfully, but these errors were encountered: