Added Bind method to Scheduler Extender

- only one extender can support the bind method
- if an extender supports bind, scheduler delegates the pod binding to the extender
This commit is contained in:
Ravi Gadde
2017-04-24 15:34:28 -07:00
parent 0cff839317
commit 7f179bf936
13 changed files with 202 additions and 21 deletions

View File

@@ -35,6 +35,12 @@ type SchedulerExtender interface {
// are used to compute the weighted score for an extender. The weighted scores are added to
// the scores computed by Kubernetes scheduler. The total scores are used to do the host selection.
Prioritize(pod *v1.Pod, nodes []*v1.Node) (hostPriorities *schedulerapi.HostPriorityList, weight int, err error)
// Bind delegates the action of binding a pod to a node to the extender.
Bind(binding *v1.Binding) error
// IsBinder returns whether this extender is configured for the Bind method.
IsBinder() bool
}
// ScheduleAlgorithm is an interface implemented by things that know how to schedule pods