-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Use strategic merge patching for Core APIs #1086
chore: Use strategic merge patching for Core APIs #1086
Conversation
986dcec
to
f57c11d
Compare
f57c11d
to
2e0e0da
Compare
Excited to see this as we have been observing this on the AKS side as well 🥳🥳🥳🥳🥳🥳🥳🥳 AKS Sample error
|
Yeah, sadly still doesn't solve the problem for CRDs 😞 Maybe one day we will get strategic merge patch support for CRDs. |
Pull Request Test Coverage Report for Build 8229522584Details
💛 - Coveralls |
@Bryce-Soghigian Just in case you were curious: As I was thinking through how this would actually work (considering strategic merge patches are good at representing merge operations, but I wasn't sure how they would resolve delete operations), I stumbled upon this deep in the documentation on the Kubernetes issues. Apparently there's a bespoke directive ( |
@jonathan-innis interesting will dive into the depths tommorrow |
I was a little curious about what the time difference would be for running Strategic Merge Patching vs. Merge Patching. Here's the results from benchmarking. Turns out that strategic merge patching is slower as expected, but it looks like it's running at 20ms slower, which seems reasonable to take as an overhead cost here Strategic Merge Patching
Merge Patching
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jonathan-innis, njtran The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #N/A
Description
Core APIs support strategic merge patching. This provides a more advanced way to patch together lists from standard merge patching, where lists can be merged if they have a
strategic-merge-patch-key
to denote them. For instance, this is true for the status conditions API.CRDs do not support strategic merge patching out of the box so we cannot get rid of standard merge patching for them. This will resolve some errors in AWS E2E testing, where we are seeing errors like
patching node, Node \"ip-192-168-49-61.us-east-2.compute.internal\" is invalid: metadata.finalizers: Forbidden: no new finalizers can be added if the object is being deleted, found new finalizers []string{\"foregroundDeletion\"}"}
How was this change tested?
make presubmit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.