update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go

This commit is contained in:
Chao Xu
2015-05-22 16:40:57 -07:00
parent 9b67435cf3
commit 9c1153322e
45 changed files with 291 additions and 291 deletions

View File

@@ -269,7 +269,7 @@ func describePod(pod *api.Pod, rcs []api.ReplicationController, events *api.Even
return tabbedString(func(out io.Writer) error {
fmt.Fprintf(out, "Name:\t%s\n", pod.Name)
fmt.Fprintf(out, "Image(s):\t%s\n", makeImageList(&pod.Spec))
fmt.Fprintf(out, "Host:\t%s\n", pod.Spec.Host+"/"+pod.Status.HostIP)
fmt.Fprintf(out, "Node:\t%s\n", pod.Spec.NodeName+"/"+pod.Status.HostIP)
fmt.Fprintf(out, "Labels:\t%s\n", formatLabels(pod.Labels))
fmt.Fprintf(out, "Status:\t%s\n", string(pod.Status.Phase))
fmt.Fprintf(out, "Replication Controllers:\t%s\n", printReplicationControllersByLabels(rcs))
@@ -612,7 +612,7 @@ func (d *NodeDescriber) Describe(namespace, name string) (string, error) {
}
for i := range allPods.Items {
pod := &allPods.Items[i]
if pod.Spec.Host != name {
if pod.Spec.NodeName != name {
continue
}
pods = append(pods, pod)