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

@@ -64,10 +64,10 @@ func (s *ServiceSpread) CalculateSpreadPriority(pod *api.Pod, podLister algorith
counts := map[string]int{}
if len(nsServicePods) > 0 {
for _, pod := range nsServicePods {
counts[pod.Spec.Host]++
counts[pod.Spec.NodeName]++
// Compute the maximum number of pods hosted on any minion
if counts[pod.Spec.Host] > maxCount {
maxCount = counts[pod.Spec.Host]
if counts[pod.Spec.NodeName] > maxCount {
maxCount = counts[pod.Spec.NodeName]
}
}
}
@@ -141,7 +141,7 @@ func (s *ServiceAntiAffinity) CalculateAntiAffinityPriority(pod *api.Pod, podLis
podCounts := map[string]int{}
for _, pod := range nsServicePods {
label, exists := labeledMinions[pod.Spec.Host]
label, exists := labeledMinions[pod.Spec.NodeName]
if !exists {
continue
}