You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
K8S-ObjectMatcher is a Golang library which helps to match Kubernetes objects.
6
7
7
8
### Motivation
@@ -16,7 +17,7 @@ There is a legacy version of the lib, that is now deprecated and documented here
16
17
17
18
The library uses the same method that `kubectl apply` does under the hood to calculate a patch using the [three way merge](http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902) method.
18
19
However for this to work properly we need to keep track of the last applied version of our object, let's call it the `original`. Unfortunately Kubernetes does
19
-
not keep track of our previously submitted object versions, but we can put it into an annotation like `kubectl apply` does.
20
+
not keep track of our previously submitted object versions, but we can put it into an annotation like `kubectl apply` does.
20
21
Next time we query the `current` state of the object from the API Server we can extract the `original` version from the annotation.
21
22
22
23
Once we have the the `original`, the `current` and our new `modified` object in place the library will take care of the rest.
0 commit comments