mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
Add a system modeler to scheduler
So it can try to predict the effect its bindings will have.
This commit is contained in:
@@ -342,6 +342,15 @@ func MapPodsToMachines(lister PodLister) (map[string][]api.Pod, error) {
|
||||
return map[string][]api.Pod{}, err
|
||||
}
|
||||
for _, scheduledPod := range pods {
|
||||
// TODO: switch to Spec.Host! There was some confusion previously
|
||||
// about whether components should judge a pod's location
|
||||
// based on spec.Host or status.Host. It has been decided that
|
||||
// spec.Host is the canonical location of the pod. Status.Host
|
||||
// will either be removed, be a copy, or in theory it could be
|
||||
// used as a signal that kubelet has agreed to run the pod.
|
||||
//
|
||||
// This could be fixed now, but just requires someone to try it
|
||||
// and verify that e2e still passes.
|
||||
host := scheduledPod.Status.Host
|
||||
machineToPods[host] = append(machineToPods[host], scheduledPod)
|
||||
}
|
||||
|
Reference in New Issue
Block a user