Merge pull request #50296 from mengqiy/addApplyTestForReplacekeys
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
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 https://github.com/kubernetes/kubernetes/issues/34292#issue-181572469 and similar issue caused by defaulting in volume.
The change is [backward compatible](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/add-new-patchStrategy-to-clear-fields-not-present-in-patch.md#version-skew).
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.
```release-note
Add `retainKeys` to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy.
```
/assign @apelisse
/assign @janetkuo for deployment change
/assign @saad-ali for volume change