Merge pull request #909 from lavalamp/scheduler3

Scheduler plugin v1
This commit is contained in:
Clayton Coleman
2014-08-21 19:04:51 -04:00
24 changed files with 1310 additions and 104 deletions

View File

@@ -36,6 +36,7 @@ func (f FakeMinionLister) List() ([]string, error) {
// PodLister interface represents anything that can list pods for a scheduler
type PodLister interface {
// TODO: make this exactly the same as client's ListPods() method...
ListPods(labels.Selector) ([]api.Pod, error)
}

View File

@@ -57,6 +57,7 @@ func (s *RandomFitScheduler) Schedule(pod api.Pod, minionLister MinionLister) (s
return "", err
}
machineToPods := map[string][]api.Pod{}
// TODO: perform more targeted query...
pods, err := s.podLister.ListPods(labels.Everything())
if err != nil {
return "", err