Commit Graph

12 Commits

Author SHA1 Message Date
Sean Sullivan 969a47ceed StreamTranslator and FallbackExecutor for WebSockets
Kubernetes-commit: 168998e87bfd49a1b0bc6402761fafd5ace3bb3b
2023-07-06 21:22:07 -07:00
Arda Güçlü 3f05cfcd78 Migrate genericclioptions.IOStreams usage to genericiooptions
Kubernetes-commit: 00c30941260a27e6929aef84c7fdbc8f1508518c
2023-04-05 14:07:46 +03:00
Lee Verberne f713c9d779 Fix error message in attach_test.go
Co-authored-by: Akanksha kumari <akankshakumari393@gmail.com>

Kubernetes-commit: 1dd3879da03b6a8cdef423c9fef096d1a4814448
2022-07-17 12:38:26 +02:00
Lee Verberne 3e07021378 Fix incorrect message when attaching to ephemeral containers
Kubernetes-commit: 8d4ec9ac9dcf45b66111075a1b67043c2885b263
2022-07-15 19:23:24 +02:00
Clayton Coleman 56434236a4 kubectl: Inline the containers for the user in attach/exec
The behavior of the container defaulting in attach/exec is inconsistent
and should be unified. As a user, when we default the vast majority of
pods will have a small number of containers and so printing the container
names inline (as kubectl logs did) is more appropriate. The debug message
we printed about using describe was already longer than 99% of all pod
container names, so we were wasting user time.

Unify container selection for exec and attach to be consistent with old
behavior. Properly handle the --quiet flag (should not print in that case)
for both commands. Remove EnableCmdSuggestion and the machinery it needs.

The message now prints:

> Defaulted container "etcdctl" out of: etcdctl, etcd, etcd-metrics, etcd-ensure-env-vars (init), etcd-resources-copy (init)

Kubernetes-commit: 43e8ebbbcd3f57d18d8151efb6242f88a763b06d
2021-02-11 11:40:25 -05:00
bl-ue 3bac60a8ed Fix typo in kubectl/.../attach_test.go
exepctedErr -> expectedErr

Kubernetes-commit: b34d00aa09084d5786d4ca5cf11b173be9f791eb
2020-11-27 14:55:23 -05:00
Clayton Coleman 4ca8f5ecfe test: kubectl unit tests should be using codecs without conversion
Tests are also refactored to use the simpler RESTClient code path.

Kubernetes-commit: 8a9b8c87c40ee65751828d9dd02f4f642588f0ce
2019-11-03 15:20:10 -05:00
clarklee92 87db492820 Modify the status code number to HTTP status semantics
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
2019-11-06 00:45:35 +08:00
Lee Verberne 8408ed1e0b Allow kubectl to attach to an ephemeral container
Kubernetes-commit: 5bd8a045d651005cd8cb1d34d835fdb487651325
2018-04-13 16:55:15 +02:00
Sean Sullivan 1483769081 Update gofmt
Kubernetes-commit: e2cae2344486af198f8ab38e4dd97d4f24dfd190
2019-08-01 13:14:06 -07:00
Sean Sullivan 5b48717f2d Update import statements to reflect code move
Kubernetes-commit: acece3c2964115a4f29a43e368ad5de59dbbc258
2019-08-01 11:10:05 -07:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00