Merge pull request #23988 from php-coder/kubectl_describe_multiline_labels

Automatic merge from submit-queue

kubectl describe: show multiple labels/annotations on multiple lines

Small UX improvement: when there is more than one label/annotation, it's more readable to see them on the different lines.

Before:
```console
$ kubectl describe svc
Name:			s2i-test
Namespace:		test2
Labels:			app=s2i-test,foo=bar
...
```
After:
```console
$ kubectl describe svc
Name:			s2i-test
Namespace:		test2
Labels:			app=s2i-test
				foo=bar
...
```
This change affects output of the labels/annotations in many of the sub-commands of the `kubectl describe`.

PTAL @smarterclayton @kargakis
This commit is contained in:
k8s-merge-robot
2016-05-08 12:51:45 -07:00
2 changed files with 59 additions and 25 deletions

View File

@@ -640,7 +640,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
{"Name:", "redis-master-"},
{"Namespace:", ns},
{"Node:"},
{"Labels:", "app=redis", "role=master"},
{"Labels:", "app=redis"},
{"role=master"},
{"Status:", "Running"},
{"IP:"},
{"Controllers:", "ReplicationController/redis-master"},
@@ -658,7 +659,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
{"Namespace:", ns},
{"Image(s):", redisImage},
{"Selector:", "app=redis,role=master"},
{"Labels:", "app=redis,role=master"},
{"Labels:", "app=redis"},
{"role=master"},
{"Replicas:", "1 current", "1 desired"},
{"Pods Status:", "1 Running", "0 Waiting", "0 Succeeded", "0 Failed"},
// {"Events:"} would ordinarily go in the list
@@ -674,7 +676,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
requiredStrings = [][]string{
{"Name:", "redis-master"},
{"Namespace:", ns},
{"Labels:", "app=redis", "role=master"},
{"Labels:", "app=redis"},
{"role=master"},
{"Selector:", "app=redis", "role=master"},
{"Type:", "ClusterIP"},
{"IP:"},