Files
kubernetes/pkg/kubectl
Kubernetes Submit Queue 4425841ce2 Merge pull request #53158 from liggitt/update-pod-spec-versioned
Automatic merge from submit-queue (batch tested with PRs 53101, 53158, 52165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Calculate patches for  commands using input version

Fixes #53040

the encoder used for encoding these objects while calculating patches does not have sufficient information to select a correct version when the object does not exist in all versions of a target group (like replicasets not existing in apps/v1beta1)

this PR wraps the encoder to first convert to the same version used to read the object (based on the mapping's GroupVersion)

long-term, we should switch UpdatePodSpecForObject to work on versioned objects and v1.PodSpec and avoid conversion altogether

```release-note
Fixes an issue with `kubectl set` commands encountering conversion errors for ReplicaSet and DaemonSet objects
```
2017-09-29 14:36:19 -07:00
..
2017-08-31 23:31:12 -07:00
2017-06-22 11:31:03 -07:00
2017-06-22 11:31:03 -07:00
2017-08-31 19:11:01 -04:00
2017-06-03 14:35:49 +08:00
2017-07-23 02:12:53 +08:00
2017-08-09 10:37:03 +08:00
2017-06-22 11:31:03 -07:00