Merge pull request #8939 from bcbroussard/describe-nodeport

Update NodePort in kubectl describe service
This commit is contained in:
Tim Hockin 2015-05-28 14:52:47 -07:00
commit 6d5ccf75dd

View File

@ -520,7 +520,7 @@ func describeService(service *api.Service, endpoints *api.Endpoints, events *api
}
fmt.Fprintf(out, "Port:\t%s\t%d/%s\n", name, sp.Port, sp.Protocol)
if sp.NodePort != 0 {
fmt.Fprintf(out, "NodePort:\t%s\t%d/%s\n", name, sp.Port, sp.Protocol)
fmt.Fprintf(out, "NodePort:\t%s\t%d/%s\n", name, sp.NodePort, sp.Protocol)
}
fmt.Fprintf(out, "Endpoints:\t%s\t%s\n", name, formatEndpoints(endpoints, util.NewStringSet(sp.Name)))
}