Commit eb473676 authored by Victor HU's avatar Victor HU Committed by hurf

display pod namespace while describe node

parent 0dfb681b
...@@ -675,8 +675,9 @@ func describeNode(node *api.Node, pods []*api.Pod, events *api.EventList) (strin ...@@ -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, "ExternalID:\t%s\n", node.Spec.ExternalID)
} }
fmt.Fprintf(out, "Pods:\t(%d in total)\n", len(pods)) fmt.Fprintf(out, "Pods:\t(%d in total)\n", len(pods))
fmt.Fprint(out, " Namespace\tName\n")
for _, pod := range pods { 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 { if events != nil {
DescribeEvents(events, out) DescribeEvents(events, out)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment