k3s/pkg/kubectl/cmd
Kubernetes Submit Queue b9d2d74a94 Merge pull request #37038 from ymqytw/retry_old_patch_after_new_patch_fail
Automatic merge from submit-queue

Fix kubectl Stratigic Merge Patch compatibility

As @smarterclayton pointed out in [comment1](https://github.com/kubernetes/kubernetes/pull/35647#pullrequestreview-8290820) and [comment2](https://github.com/kubernetes/kubernetes/pull/35647#pullrequestreview-8290847) in PR #35647,
we cannot assume the API servers publish version and they shares the same version.

This PR removes all the calls of GetServerSupportedSMPatchVersion().
Change the behavior of `apply` and `edit` to:
Retrying with the old patch version, if the new version fails.
Default other usage of SMPatch to the new version, since they don't update list of primitives.

fixes #36916

cc: @pwittrock @smarterclayton
2016-11-19 01:02:47 -08:00
..
config Merge pull request #35967 from saturnism/patch-2 2016-11-18 08:28:12 -08:00
rollout try old patch after new patch fails 2016-11-17 14:28:09 -08:00
set try old patch after new patch fails 2016-11-17 14:28:09 -08:00
templates autogenerated 2016-10-21 17:32:32 -07:00
testing add a unit test 2016-11-18 15:35:50 -08:00
util Merge pull request #37038 from ymqytw/retry_old_patch_after_new_patch_fail 2016-11-19 01:02:47 -08:00
BUILD add a unit test 2016-11-18 15:35:50 -08:00
annotate.go try old patch after new patch fails 2016-11-17 14:28:09 -08:00
annotate_test.go support patch list of primitives 2016-11-09 11:46:59 -08:00
apiversions.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
apply.go Update apply and edit 2016-11-18 09:01:28 -08:00
apply_test.go add a unit test 2016-11-18 15:35:50 -08:00
attach.go include multiple versions in clientset 2016-10-29 13:30:47 -07:00
attach_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
autoscale.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
certificates.go implement kubectl procelain csr commands 2016-11-08 06:33:46 -08:00
clusterinfo.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
clusterinfo_dump.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
clusterinfo_dump_test.go Move the common test functions from cmd_test.go to cmd/testing/fake.go 2016-10-19 08:53:26 +10:00
cmd.go Adding statefulset to the kubectl output for valid resources 2016-11-17 13:53:23 -08:00
cmd_test.go support patch list of primitives 2016-11-09 11:46:59 -08:00
completion.go Add boilerplate to kubectl completion bash 2016-10-21 14:07:38 -07:00
convert.go Fix handling lists in kubectl convert 2016-11-10 18:19:30 -02:00
cp.go add kubectl cp 2016-10-29 20:24:54 -07:00
cp_test.go add kubectl cp 2016-10-29 20:24:54 -07:00
create.go update default run function for sub-commands 2016-10-31 10:08:12 -04:00
create_configmap.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
create_configmap_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
create_deployment.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
create_deployment_test.go Move the common test functions from cmd_test.go to cmd/testing/fake.go 2016-10-19 08:53:26 +10:00
create_namespace.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
create_namespace_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
create_quota.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
create_quota_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
create_secret.go update default run function for sub-commands 2016-10-31 10:08:12 -04:00
create_secret_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
create_service.go update default run function for sub-commands 2016-10-31 10:08:12 -04:00
create_service_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
create_serviceaccount.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
create_serviceaccount_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
create_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
delete.go Merge pull request #35484 from smarterclayton/delete_warning 2016-11-05 11:19:04 -07:00
delete_test.go make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
describe.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
describe_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
drain.go Merge pull request #36211 from brendandburns/cordon 2016-11-08 16:05:53 -08:00
drain_test.go Fix kubectl drain for statefulset and use eviciton for drain if possible 2016-11-07 16:13:06 -08:00
edit.go Update apply and edit 2016-11-18 09:01:28 -08:00
exec.go include multiple versions in clientset 2016-10-29 13:30:47 -07:00
exec_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
explain.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
expose.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
expose_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
get.go make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
get_test.go make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
help.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
label.go try old patch after new patch fails 2016-11-17 14:28:09 -08:00
label_test.go support patch list of primitives 2016-11-09 11:46:59 -08:00
logs.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
logs_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
options.go update kubectl help output for better organization 2016-08-20 08:03:39 +08:00
patch.go try old patch after new patch fails 2016-11-17 14:28:09 -08:00
patch_test.go support patch list of primitives 2016-11-09 11:46:59 -08:00
portforward.go include multiple versions in clientset 2016-10-29 13:30:47 -07:00
portforward_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
proxy.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
replace.go make kubectl replace generic 2016-11-04 07:50:31 -04:00
replace_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
rollingupdate.go Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
rollingupdate_test.go Move the common test functions from cmd_test.go to cmd/testing/fake.go 2016-10-19 08:53:26 +10:00
run.go Merge pull request #36355 from soltysh/deprecate_extensionsjob 2016-11-08 07:18:40 -08:00
run_test.go Merge pull request #35732 from fabianofranz/run_cant_dryrun_with_attach 2016-10-30 13:07:28 -07:00
scale.go try old patch after new patch fails 2016-11-17 14:28:09 -08:00
stop.go Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
taint.go try old patch after new patch fails 2016-11-17 14:28:09 -08:00
taint_test.go support patch list of primitives 2016-11-09 11:46:59 -08:00
top.go update default run function for sub-commands 2016-10-31 10:08:12 -04:00
top_node.go include multiple versions in clientset 2016-10-29 13:30:47 -07:00
top_node_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
top_pod.go include multiple versions in clientset 2016-10-29 13:30:47 -07:00
top_pod_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
top_test.go update default run function for sub-commands 2016-10-31 10:08:12 -04:00
version.go kubectl: add less verbose version 2016-11-10 14:07:42 -08:00