kubernetes/pkg/kubectl/cmd/util
Kubernetes Submit Queue ce998a9fa7 Merge pull request #40365 from shiywang/attach
Automatic merge from submit-queue (batch tested with PRs 41145, 38771, 41003, 41089, 40365)

Add `kubectl attach` support for multiple types

To address this issue: https://github.com/kubernetes/kubernetes/issues/24857
the new `kubectl attach` will contain three scenarios depend on args:
1. `kubectl attach POD` :   if only one argument provided, we assume it's a pod name
2. `kubectl attach TYPE NAME` : if two arguments provided, we assume first one is resource we [supported](4770162fd3/pkg/kubectl/cmd/util/factory_object_mapping.go (L285)), the second resource's name.
3. `kubectl attach TYPE/NAME` : one argument provided and arg[0] must contain `/`, ditto

Is there any other scenarios I haven't consider in ?

for now the first scenario is compatible with changed before, also `make test` pass  
will write some unit test to test second and third scenario, if you guys think i'm doing the right way.
@pwittrock @kargakis @fabianofranz @ymqytw @AdoHe
2017-02-09 13:34:56 -08:00
..
editor Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
jsonmerge extract util used by jsonmergepatch and SMPatch 2017-02-03 15:28:42 -08:00
sanity Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
BUILD fix --record to work with unstructured objects 2017-01-26 19:59:27 -05:00
cached_discovery_test.go move dynamic and discovery clients 2017-01-26 08:37:06 -05:00
cached_discovery.go move dynamic and discovery clients 2017-01-26 08:37:06 -05:00
clientcache.go move testing/core to client-go 2017-01-26 13:54:40 -05:00
factory_builder.go Fall back to unstructured typer retrieving GVKs for printing 2017-01-26 19:59:26 -05:00
factory_client_access.go Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
factory_object_mapping.go kubectl attach support for multiple types 2017-02-08 16:10:55 +08:00
factory_test.go move testing/core to client-go 2017-01-26 13:54:40 -05:00
factory.go kubectl: remove ThirdPartyResourceData behavior for unregistered objects 2017-01-26 19:59:24 -05:00
helpers_test.go Made multi-scheduler graduated to Beta and then v1. 2017-01-19 20:16:01 +08:00
helpers.go avoid repeated length calculation and some other code improvements 2017-02-06 09:19:46 +08:00
printing.go refactor delete to remove cobra dependency 2017-01-15 15:30:06 +08:00
shortcut_restmapper_test.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
shortcut_restmapper.go move dynamic and discovery clients 2017-01-26 08:37:06 -05:00