kubectl/pkg/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
..
certificate Add v1 CSR support to kubectl describe 2020-06-04 12:05:51 -04:00
deployment Fixed percentage behavior in instr 2020-03-22 23:41:45 +00:00
event Move pkg/kubectl/util/event into staging 2019-06-19 15:31:51 -07:00
fieldpath Move pkg/kubectl/util/fieldpath to staging 2019-06-19 17:13:57 -07:00
hash Immutable field and validation 2019-11-26 13:29:26 +01:00
i18n switch over k/k to use klog v2 2020-04-17 15:25:06 -04:00
interrupt Moved pkg/kubectl/util/term, pkg/kubectl/util/templates, pkg/kubectl/util/interrupt, and pkg/kubectl/util/interrupt to staging 2019-06-19 16:31:38 +02:00
logs switch over k/k to use klog v2 2020-04-17 15:25:06 -04:00
openapi Fix kubectl openapi test to use apps/v1/Deployment 2021-03-01 19:24:15 +01:00
podutils kubectl: Inline the containers for the user in attach/exec 2021-02-11 11:40:25 -05:00
qos Delete duplicate resource.Quantity.Copy() 2019-08-19 17:23:14 -07:00
rbac When combining PolicyRules, don't duplicate verbs 2020-05-18 15:20:06 -04:00
resource Downward API hugepages 2020-11-06 14:22:53 -05:00
slice Move pkg/util/slice and update refs 2019-06-19 23:24:56 -04:00
storage Moving pkg/kubectl/util/storage to staging 2019-06-07 01:13:40 -04:00
templates go1.14: fix gofmt errors 2020-06-23 15:06:11 -04:00
term cmd: silence warnings in kube-controller-manager/kube-apiserver, dedupe/color warnings in kubectl 2020-06-08 15:20:19 -04:00
apply.go Move pkg/kubectl/apply.go to staging 2019-07-24 20:40:25 -07:00
pod_port.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
pod_port_test.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
service_port.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
service_port_test.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
umask.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
umask_windows.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
util.go cleanup: fix some error log capitalization 2020-10-28 16:44:54 +08:00
util_test.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00