-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix AddAnnotations for unstructured.Unstructured
The previous implementation worked well for most Object implementations (definitely all embedding metav1.ObjectMeta) because it relies on: * The fact that GetAnnotations doesn't return a copy of the annotations but the underlying map storing them. * When calling set annotations, the input map is used for storage in the Object implementation, hence when adding entries to that map from the outside, it changes the content of the Object's annotations. This is not necessarily part of the contract specified by metav1.Object so we can't really guarantee all implementations will satisfy these 2 conditions. It turns out, unstructured.Unstructured doesn't.
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters