-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Strategic Merge Patch doc #535
Conversation
/assign @pwittrock |
Example usage in the patch: | ||
|
||
``` | ||
$patch: replace |
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.
Put the example in the context of an actual json struct. This doesn't show demonstrate how to create a patch with this directive.
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.
Nevermind, I should have kept reading :P
To delete items "b" and "c" from the original finalizers, the patch will be: | ||
|
||
```yaml | ||
$deleteFromPrimitiveList/finalizers: |
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.
Would you add the context around this like you did for the others?
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.
Done.
Generally looks good. Just one comment about adding an example for the delete for primitives |
|
||
### Purpose | ||
|
||
`delete` directive indicates that the element that contains it should be deleted. |
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.
Does this apply to maps, or just lists? Will maps setting to null is how items are deleted right?
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.
Does this apply to maps, or just lists?
Both map and list of maps.
Will maps setting to null is how items are deleted right?
That's one way. The other way is using delete directive in map.
I updated the doc to cover both.
live: null # set the value of the map key to null | ||
``` | ||
|
||
Details of Strategic Merge Patch is in this [doc](../strategic-merge-patch.md). |
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.
Looks good, one minor comment then ready to merge. |
Addressed the comment. And squashed. |
Thanks! |
Pull Strategic Merge Patch out of API convention doc.
And refactor it.
Use the format what I discussed with @pwittrock offline.
More content need to be fill by @pwittrock in a followup PR.