Display <none> for "kubectl get pods -o wide" when node is empty.

This commit is contained in:
xiangpengzhao
2017-05-10 12:53:14 +08:00
parent 0f3403d351
commit a9a36fcf4b

View File

@@ -345,6 +345,9 @@ func printPodBase(pod *api.Pod, w io.Writer, options printers.PrintOptions) erro
if podIP == "" {
podIP = "<none>"
}
if nodeName == "" {
nodeName = "<none>"
}
if _, err := fmt.Fprintf(w, "\t%s\t%s",
podIP,
nodeName,