kubernetes/pkg/kubectl
Kubernetes Submit Queue b840605197 Merge pull request #33677 from juanvallejo/jvallejo/add-linebreak-between-resource-groups
Automatic merge from submit-queue

add linebreak between resource groups

**Release note**:
```release-note
release-note-none
```

Printing multiple groups via `kubectl get all` can produce output that is
hard to read in cases where there are a lot of resource types to display
/ some resource types contain varying column amounts.

This patch adds a linebreak above each group of resources only when
there is more than one group to display, and always omitting the
linebreak above the first group. This makes for slightly improved
output.

Linebreaks are printed to stderr, and honor the `--no-headers` option.

**Before**

```
$ kubectl get all
NAME                     READY     STATUS    RESTARTS   AGE
po/database-1-u9m9l      1/1       Running   3          5d
po/idling-echo-1-9fmz6   2/2       Running   8          5d
po/idling-echo-1-gzb0v   2/2       Running   4          5d
NAME               DESIRED   CURRENT   READY     AGE
rc/database-1      1         1         1         6d
rc/idling-echo-1   2         2         2         6d
NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)
AGE
svc/database      172.30.11.104    <none>        5434/TCP
6d
svc/frontend      172.30.196.217   <none>        5432/TCP
6d
svc/idling-echo   172.30.115.67    <none>        8675/TCP,3090/UDP
6d
svc/kubernetes    172.30.0.1       <none>        443/TCP,53/UDP,53/TCP
6d
svc/mynodeport    172.30.81.254    <nodes>       8080/TCP
5d
svc/mynodeport1   172.30.198.193   <nodes>       8080/TCP
5d
svc/mynodeport2   172.30.149.48    <nodes>       8080/TCP
5d
svc/mynodeport3   172.30.195.235   <nodes>       8080/TCP
5d
```

**After**

```
$ kubectl get all
NAME                     READY     STATUS    RESTARTS   AGE
po/database-1-u9m9l      1/1       Running   3          5d
po/idling-echo-1-9fmz6   2/2       Running   8          5d
po/idling-echo-1-gzb0v   2/2       Running   4          5d

NAME               DESIRED   CURRENT   READY     AGE
rc/database-1      1         1         1         6d
rc/idling-echo-1   2         2         2         6d

NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)
AGE
svc/database      172.30.11.104    <none>        5434/TCP
6d
svc/frontend      172.30.196.217   <none>        5432/TCP
6d
svc/idling-echo   172.30.115.67    <none>        8675/TCP,3090/UDP
6d
svc/kubernetes    172.30.0.1       <none>        443/TCP,53/UDP,53/TCP
6d
svc/mynodeport    172.30.81.254    <nodes>       8080/TCP
5d
svc/mynodeport1   172.30.198.193   <nodes>       8080/TCP
5d
svc/mynodeport2   172.30.149.48    <nodes>       8080/TCP
5d
svc/mynodeport3   172.30.195.235   <nodes>       8080/TCP
5d
```

cc @fabianofranz @liggitt
2016-09-28 23:13:07 -07:00
..
cmd Merge pull request #33677 from juanvallejo/jvallejo/add-linebreak-between-resource-groups 2016-09-28 23:13:07 -07:00
metricsutil Fix printing container usage. 2016-09-14 12:11:24 +02:00
resource Merge pull request #31163 from juanvallejo/jvallejo_filter-resources-before-printing 2016-09-23 10:45:57 -07:00
testing Update generated files due to dependency shift. 2016-08-09 10:41:09 -05:00
apply.go delete private interface with no references in package 2016-09-20 00:13:16 +00:00
autoscale.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
bash_comp_utils.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
configmap.go Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
configmap_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
custom_column_printer.go Simplify the output in AfterPrint() 2016-09-08 09:42:17 +10:00
custom_column_printer_test.go 24133 fix: --no-headers works with custom columns now 2016-07-07 10:04:09 +02:00
deployment.go Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
deployment_test.go Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
describe.go Merge pull request #32867 from kargakis/move-events-sort 2016-09-22 20:39:29 -07:00
describe_test.go kubectl: move events sorting interface to the api for general use 2016-09-18 19:25:42 +02:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
explain.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
history.go kubectl: refactor rollout history to be more configurable 2016-07-12 10:36:14 +02:00
interfaces.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl.go make shortcut expanding restmapper handle all 2016-09-15 11:03:51 -04:00
kubectl_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
namespace.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
namespace_test.go Fix namespace_test error message 2016-08-08 12:08:57 +10:00
OWNERS Remove bgrant from pkg/OWNERS and pkg/kubectl/OWNERS since he has plenty to do. 2016-06-16 08:21:27 -07:00
proxy_server.go Fix various typos in kubectl 2016-08-02 19:51:51 +03:00
proxy_server_test.go Make "attach" and "exec" rejection in proxy more explicit 2016-07-19 20:50:19 +02:00
quota.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
quota_test.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
resource_filter.go add resource handling before printing 2016-09-21 10:03:59 -04:00
resource_printer.go Merge pull request #31163 from juanvallejo/jvallejo_filter-resources-before-printing 2016-09-23 10:45:57 -07:00
resource_printer_test.go add resource handling before printing 2016-09-21 10:03:59 -04:00
rollback.go rollout undo add dry-run implementation 2016-09-08 08:02:04 +08:00
rolling_updater.go convert rolling updater to generated client 2016-09-12 07:38:34 -04:00
rolling_updater_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
rollout_status.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
rollout_status_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
run.go add port validate when --port is set or --expose=true 2016-09-01 17:24:02 +08:00
run_test.go add port validate when --port is set or --expose=true 2016-09-01 17:24:02 +08:00
scale.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
scale_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
secret.go Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
secret_for_docker_registry.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_docker_registry_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_tls.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
secret_for_tls_test.go the created path should be closed in test case 2016-09-06 11:08:52 +08:00
secret_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
service.go Merge pull request #28239 from ApsOps/kubectl-expose-headless-svc 2016-08-02 01:18:19 -07:00
service_basic.go Add "create service" sub-commands 2016-08-08 12:31:21 +10:00
service_basic_test.go Add "create service" sub-commands 2016-08-08 12:31:21 +10:00
service_test.go Merge pull request #28239 from ApsOps/kubectl-expose-headless-svc 2016-08-02 01:18:19 -07:00
serviceaccount.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
serviceaccount_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorted_resource_name_list.go Merge pull request #28110 from mfojtik/describe-volume-mounts 2016-06-30 17:15:05 -07:00
sorted_resource_name_list_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
sorting_printer.go Simplify the output in AfterPrint() 2016-09-08 09:42:17 +10:00
sorting_printer_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
stop.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
stop_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
version.go convert more command to use a generated clientset 2016-09-12 07:38:34 -04:00
watchloop.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00