kubectl/pkg/cmd/util
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
..
editor Strip .meta.managedFields for kubectl edit command 2020-06-09 14:56:57 +02:00
podcmd kubectl: Inline the containers for the user in attach/exec 2021-02-11 11:40:25 -05:00
sanity Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00
env_file.go Remove dependency of generators from create configmap 2021-01-10 18:47:32 -05:00
env_file_test.go Remove dependency of generators from create configmap 2021-01-10 18:47:32 -05:00
factory.go Cache the OpenAPI schema for server-side dry-run. 2021-01-19 16:36:14 -05:00
factory_client_access.go Cache the OpenAPI schema for server-side dry-run. 2021-01-19 16:36:14 -05:00
helpers.go kubectl: Inline the containers for the user in attach/exec 2021-02-11 11:40:25 -05:00
helpers_test.go Use temporary directory when creating temporary file in tests 2020-07-17 10:41:16 +02:00
kubectl_match_version.go remove pkg/version and some of redundant copies of it 2019-09-10 14:42:55 -07:00
printing.go Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00