package algorithm
import "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm"
Package scheduler contains a generic Scheduler interface and several implementations.
Index ¶
- type FakeMinionLister
- type FakePodLister
- type FakeServiceLister
- func (f FakeServiceLister) GetPodServices(pod *api.Pod) (services []api.Service, err error)
- func (f FakeServiceLister) List() (api.ServiceList, error)
- type FitPredicate
- type HostPriority
- type HostPriorityList
- func (h HostPriorityList) Len() int
- func (h HostPriorityList) Less(i, j int) bool
- func (h HostPriorityList) Swap(i, j int)
- type MinionLister
- type PodLister
- type PriorityConfig
- type PriorityFunction
- type ScheduleAlgorithm
- type ServiceLister
Types ¶
type FakeMinionLister ¶
FakeMinionLister implements MinionLister on a []string for test purposes.
func (FakeMinionLister) List ¶
func (f FakeMinionLister) List() (api.NodeList, error)
List returns minions as a []string.
type FakePodLister ¶
FakePodLister implements PodLister on an []api.Pods for test purposes.
func (FakePodLister) List ¶
List returns []*api.Pod matching a query.
type FakeServiceLister ¶
FakeServiceLister implements ServiceLister on []api.Service for test purposes.
func (FakeServiceLister) GetPodServices ¶
GetPodServices gets the services that have the selector that match the labels on the given pod
func (FakeServiceLister) List ¶
func (f FakeServiceLister) List() (api.ServiceList, error)
FakeServiceLister returns api.ServiceList, the list of all services.
type FitPredicate ¶
FitPredicate is a function that indicates if a pod fits into an existing node.
type HostPriority ¶
HostPriority represents the priority of scheduling to a particular host, lower priority is better.
type HostPriorityList ¶
type HostPriorityList []HostPriority
func (HostPriorityList) Len ¶
func (h HostPriorityList) Len() int
func (HostPriorityList) Less ¶
func (h HostPriorityList) Less(i, j int) bool
func (HostPriorityList) Swap ¶
func (h HostPriorityList) Swap(i, j int)
type MinionLister ¶
MinionLister interface represents anything that can list minions for a scheduler.
type PodLister ¶
type PodLister interface { // TODO: make this exactly the same as client's Pods(ns).List() method, by returning a api.PodList List(labels.Selector) ([]*api.Pod, error) }
PodLister interface represents anything that can list pods for a scheduler.
type PriorityConfig ¶
type PriorityConfig struct { Function PriorityFunction Weight int }
type PriorityFunction ¶
type PriorityFunction func(pod *api.Pod, podLister PodLister, minionLister MinionLister) (HostPriorityList, error)
type ScheduleAlgorithm ¶
type ScheduleAlgorithm interface { Schedule(*api.Pod, MinionLister) (selectedMachine string, err error) }
Scheduler is an interface implemented by things that know how to schedule pods onto machines.
type ServiceLister ¶
type ServiceLister interface { // Lists all the services List() (api.ServiceList, error) // Gets the services for the given pod GetPodServices(*api.Pod) ([]api.Service, error) }
ServiceLister interface represents anything that can produce a list of services; the list is consumed by a scheduler.
Source Files ¶
doc.go listers.go scheduler_interface.go types.go
Directories ¶
Path | Synopsis |
---|---|
plugin/pkg/scheduler/algorithm/predicates | |
plugin/pkg/scheduler/algorithm/priorities |
- Version
- v0.19.3
- Published
- Jun 22, 2015
- Platform
- windows/amd64
- Imports
- 3 packages
- Last checked
- 2 minutes ago –
Tools for package owners.