Skip to content

Commit

Permalink
Display node label
Browse files Browse the repository at this point in the history
  • Loading branch information
ddysher committed Nov 22, 2014
1 parent 162e498 commit 6a42b66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/getting-started-guides/vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ You may need to build the binaries first, you can do this with ```make```
```
$ export KUBERNETES_PROVIDER=vagrant
$ ./cluster/kubecfg.sh list /minions
Minion identifier
----------
Minion identifier Labels
---------- ----------
10.245.2.4
10.245.2.3
10.245.2.2
Expand Down Expand Up @@ -141,8 +141,8 @@ Your cluster is running, you can list the minions in your cluster:

```
$ cluster/kubecfg.sh list /minions
Minion identifier
----------
Minion identifier Labels
---------- ----------
10.245.2.4
10.245.2.3
10.245.2.2
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubecfg/resource_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (h *HumanReadablePrinter) validatePrintHandlerFunc(printFunc reflect.Value)
var podColumns = []string{"Name", "Image(s)", "Host", "Labels", "Status"}
var replicationControllerColumns = []string{"Name", "Image(s)", "Selector", "Replicas"}
var serviceColumns = []string{"Name", "Labels", "Selector", "IP", "Port"}
var minionColumns = []string{"Minion identifier"}
var minionColumns = []string{"Minion identifier", "Labels"}
var statusColumns = []string{"Status"}
var eventColumns = []string{"Name", "Kind", "Status", "Reason", "Message"}

Expand Down Expand Up @@ -249,7 +249,7 @@ func printServiceList(list *api.ServiceList, w io.Writer) error {
}

func printMinion(minion *api.Minion, w io.Writer) error {
_, err := fmt.Fprintf(w, "%s\n", minion.Name)
_, err := fmt.Fprintf(w, "%s\t%s\n", minion.Name, labels.Set(minion.Labels))
return err
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/resource_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (h *HumanReadablePrinter) validatePrintHandlerFunc(printFunc reflect.Value)
var podColumns = []string{"NAME", "IMAGE(S)", "HOST", "LABELS", "STATUS"}
var replicationControllerColumns = []string{"NAME", "IMAGE(S)", "SELECTOR", "REPLICAS"}
var serviceColumns = []string{"NAME", "LABELS", "SELECTOR", "IP", "PORT"}
var minionColumns = []string{"NAME"}
var minionColumns = []string{"NAME", "LABELS"}
var statusColumns = []string{"STATUS"}
var eventColumns = []string{"NAME", "KIND", "STATUS", "REASON", "MESSAGE"}

Expand Down Expand Up @@ -298,7 +298,7 @@ func printServiceList(list *api.ServiceList, w io.Writer) error {
}

func printMinion(minion *api.Minion, w io.Writer) error {
_, err := fmt.Fprintf(w, "%s\n", minion.Name)
_, err := fmt.Fprintf(w, "%s\t%s\n", minion.Name, labels.Set(minion.Labels))
return err
}

Expand Down

0 comments on commit 6a42b66

Please sign in to comment.