display pod namespace while describe node

This commit is contained in:
Victor HU 2015-06-11 01:56:57 +00:00 committed by hurf
parent 0dfb681ba5
commit eb473676ce

View File

@ -675,8 +675,9 @@ func describeNode(node *api.Node, pods []*api.Pod, events *api.EventList) (strin
fmt.Fprintf(out, "ExternalID:\t%s\n", node.Spec.ExternalID)
}
fmt.Fprintf(out, "Pods:\t(%d in total)\n", len(pods))
fmt.Fprint(out, " Namespace\tName\n")
for _, pod := range pods {
fmt.Fprintf(out, " %s\n", pod.Name)
fmt.Fprintf(out, " %s\t%s\n", pod.Namespace, pod.Name)
}
if events != nil {
DescribeEvents(events, out)