package podschedulers

import "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers"

Package podschedulers defines an interface (w/ implementations) for matching pods against offers.

Index

Types

type AllocationStrategy

type AllocationStrategy interface {
	// FitPredicate returns the selector used to determine pod fitness w/ respect to a given offer
	FitPredicate() podtask.FitPredicate

	// Procurement returns a func that obtains resources for a task from resource offer
	Procurement() podtask.Procurement
}

func NewAllocationStrategy

func NewAllocationStrategy(fitPredicate podtask.FitPredicate, procurement podtask.Procurement) AllocationStrategy

type PodScheduler

type PodScheduler interface {
	AllocationStrategy

	// SchedulePod implements how to schedule pods among slaves.
	// We can have different implementation for different scheduling policy.
	//
	// The function accepts a set of offers and a single pod, which aligns well
	// with the k8s scheduling algorithm. It returns an offerId that is acceptable
	// for the pod, otherwise nil. The caller is responsible for filling in task
	// state w/ relevant offer details.
	//
	// See the FCFSPodScheduler for example.
	SchedulePod(r offers.Registry, task *podtask.T) (offers.Perishable, error)
}

func NewFCFSPodScheduler

func NewFCFSPodScheduler(as AllocationStrategy, lookupNode node.LookupFunc) PodScheduler

Source Files

doc.go fcfs.go types.go

Version
v1.2.0-alpha.4
Published
Nov 25, 2015
Platform
darwin/amd64
Imports
6 packages
Last checked
10 minutes ago

Tools for package owners.