-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add retainKeys
to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy
#50296
Add retainKeys
to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy
#50296
Conversation
/retest |
/assign @Kargakis |
@Kargakis: GitHub didn't allow me to request PR reviews from the following users: have, switching, pain, before, validation, between, the, with, when, strategies, we, felt, since. Note that only kubernetes members can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
lgtm but I would like to read others thoughts |
lgtm as well |
I don't really understand the semantic, but I guess that is OK. /approve |
hack/make-rules/test-cmd-util.sh
Outdated
# defaulted fields and successfully update the deployment | ||
kubectl apply -f hack/testdata/retainKeys/deployment/deployment-after.yaml "${kube_flags[@]}" | ||
# Post-Condition: deployment "test-deployment-retainkeys" updated | ||
kube::test::get_object_assert deployments "{{range.items}}{{$id_field}}{{end}}" 'test-deployment-retainkeys' |
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.
nit: this line does not tell you if deployment "test-deployment-retainkeys" is updated or not
19b79ff
to
31c92d9
Compare
@janetkuo Updated. PTAL. Thanks! |
This lgtm. You may squash commits. |
31c92d9
to
93d2625
Compare
93d2625
to
9b05e26
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: janetkuo, mengqiy, thockin Associated issue: 34292 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
/retest Review the full test history for this PR. |
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296) |
Add
retainKeys
to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy.With the new value in
patchStrategy
, the patch will include an optional directive that will tell the apiserver to clear defaulted fields and update. This will resolve issue like #34292 (comment) and similar issue caused by defaulting in volume.The change is backward compatible.
The proposal for this new patch strategy is in https://github.com/kubernetes/community/blob/master/contributors/design-proposals/add-new-patchStrategy-to-clear-fields-not-present-in-patch.md
The implementation to support the new patch strategy's logic is in #44597 and has been merged in 1.7.
/assign @apelisse
/assign @janetkuo for deployment change
/assign @saad-ali for volume change