mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
@@ -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)
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user