Merge pull request #8853 from caesarxuchao/HostToNodeName

update PodSpec.Host to PodSpec.NodeName
This commit is contained in:
Tim Hockin
2015-05-28 15:50:12 -07:00
45 changed files with 291 additions and 291 deletions

View File

@@ -425,7 +425,7 @@ func (nc *NodeController) deletePods(nodeID string) error {
}
for _, pod := range pods.Items {
// Defensive check, also needed for tests.
if pod.Spec.Host != nodeID {
if pod.Spec.NodeName != nodeID {
continue
}
glog.V(2).Infof("Delete pod %v", pod.Name)

View File

@@ -566,7 +566,7 @@ func newNode(name string) *api.Node {
}
func newPod(name, host string) *api.Pod {
return &api.Pod{ObjectMeta: api.ObjectMeta{Name: name}, Spec: api.PodSpec{Host: host}}
return &api.Pod{ObjectMeta: api.ObjectMeta{Name: name}, Spec: api.PodSpec{NodeName: host}}
}
func sortedNodeNames(nodes []*api.Node) []string {