Documentation ¶
Index ¶
- Constants
- Variables
- func MakeDefaultErrorFunc(client client.Interface, stageLister listerv1.StageLister, ...) func(*framework.QueuedStageInfo, error)
- func NewHTTPExtender(config *config.Extender) (framework.Extender, error)
- type ExtenderArgs
- type ExtenderBindingResult
- type ExtenderFilterResult
- type ExtenderPreemptionArgs
- type ExtenderPreemptionResult
- type FailedWorkersMap
- type FrameworkCapturer
- type HTTPExtender
- func (h *HTTPExtender) Bind(binding *meta.Binding) error
- func (h *HTTPExtender) Filter(stage *meta.Stage, workers []*meta.Worker) (filteredWorkers []*meta.Worker, failedWorkersMap map[string]string, ...)
- func (h *HTTPExtender) IsBinder() bool
- func (h *HTTPExtender) IsIgnorable() bool
- func (h *HTTPExtender) IsInterested(stage *meta.Stage) bool
- func (h *HTTPExtender) Name() string
- func (h *HTTPExtender) Prioritize(stage *meta.Stage, workers []*meta.Worker) (hostPriorities *framework.HostPriorityList, weight int64, err error)
- func (h *HTTPExtender) ProcessPreemption(_ *meta.Stage, _ map[string]interface{}, _ interface{}) (map[string]interface{}, error)
- func (h *HTTPExtender) SupportsPreemption() bool
- type Option
- func WithBuildFrameworkCapturer(fc FrameworkCapturer) Option
- func WithConfig(cfg *rest.Config) Option
- func WithExtenders(e ...config.Extender) Option
- func WithFrameworkOutOfTreeRegistry(registry frameworkruntime.Registry) Option
- func WithParallelism(threads int32) Option
- func WithPercentageOfWorkersToScore(percentageOfWorkersToScore int32) Option
- func WithProfiles(p ...config.Profile) Option
- func WithStageInitialBackoffSeconds(stageInitialBackoffSeconds int64) Option
- func WithStageMaxBackoffSeconds(stageMaxBackoffSeconds int64) Option
- func WithStageMaxInUnschedulableStagesDuration(duration time.Duration) Option
- type ScheduleResult
- type Scheduler
- type Victims
Constants ¶
const MaxExtenderPriority = 10
Variables ¶
var NeverStop <-chan struct{} = make(chan struct{})
NeverStop may be passed to Until to make it never stop.
Functions ¶
func MakeDefaultErrorFunc ¶
func MakeDefaultErrorFunc(client client.Interface, stageLister listerv1.StageLister, stageQueue queue.SchedulingQueue, schedulerCache cache.Cache) func(*framework.QueuedStageInfo, error)
Types ¶
type ExtenderArgs ¶
type ExtenderArgs struct { // Stage being scheduled Stage *meta.Stage // List of candidate workers where the stage can be scheduled; to be populated // only if Extender.WorkerCacheCapable == false Workers *meta.WorkerList // List of candidate worker names where the stage can be scheduled; to be // populated only if Extender.WorkerCacheCapable == true WorkerNames *[]string }
ExtenderArgs represents the arguments needed by the extender to filter/prioritize workers for a stage.
type ExtenderBindingResult ¶
type ExtenderBindingResult struct { // Error message indicating failure Error string }
ExtenderBindingResult represents the result of binding of a stage to a worker from an extender.
type ExtenderFilterResult ¶
type ExtenderFilterResult struct { // Filtered set of workers where the stage can be scheduled; to be populated // only if Extender.WorkerCacheCapable == false Workers *meta.WorkerList // Filtered set of workers where the stage can be scheduled; to be populated // only if Extender.WorkerCacheCapable == true WorkerNames *[]string // Filtered out workers where the stage can't be scheduled and the failure messages FailedWorkers FailedWorkersMap // Filtered out workers where the stage can't be scheduled and preemption would // not change anything. The value is the failure message same as FailedWorkers. // Workers specified here takes precedence over FailedWorkers. FailedAndUnresolvableWorkers FailedWorkersMap // Error message indicating failure Error string }
ExtenderFilterResult represents the results of a filter call to an extender
type ExtenderPreemptionArgs ¶
type ExtenderPreemptionArgs struct { // Stage being scheduled Stage *meta.Stage // Victims map generated by scheduler preemption phase // Only set WorkerNameToMetaVictims if Extender.WorkerCacheCapable == true. Otherwise, only set WorkerNameToVictims. WorkerNameToVictims map[string]*Victims WorkerNameToMetaVictims map[string]interface{} }
ExtenderPreemptionArgs represents the arguments needed by the extender to preempt stages on workers.
type ExtenderPreemptionResult ¶
type ExtenderPreemptionResult struct {
WorkerNameToMetaVictims map[string]interface{}
}
ExtenderPreemptionResult represents the result returned by preemption phase of extender.
type FailedWorkersMap ¶
FailedWorkersMap represents the filtered out workers, with worker names and failure messages
type FrameworkCapturer ¶
FrameworkCapturer is used for registering a notify function in building framework.
type HTTPExtender ¶
type HTTPExtender struct {
// contains filtered or unexported fields
}
HTTPExtender implements the Extender interface.
func (*HTTPExtender) IsBinder ¶
func (h *HTTPExtender) IsBinder() bool
func (*HTTPExtender) IsIgnorable ¶
func (h *HTTPExtender) IsIgnorable() bool
func (*HTTPExtender) IsInterested ¶
func (h *HTTPExtender) IsInterested(stage *meta.Stage) bool
func (*HTTPExtender) Name ¶
func (h *HTTPExtender) Name() string
func (*HTTPExtender) Prioritize ¶
func (h *HTTPExtender) Prioritize(stage *meta.Stage, workers []*meta.Worker) (hostPriorities *framework.HostPriorityList, weight int64, err error)
func (*HTTPExtender) ProcessPreemption ¶
func (*HTTPExtender) SupportsPreemption ¶
func (h *HTTPExtender) SupportsPreemption() bool
type Option ¶
type Option func(*schedulerOptions)
Option configures a Scheduler
func WithBuildFrameworkCapturer ¶
func WithBuildFrameworkCapturer(fc FrameworkCapturer) Option
func WithConfig ¶
func WithExtenders ¶
func WithFrameworkOutOfTreeRegistry ¶
func WithFrameworkOutOfTreeRegistry(registry frameworkruntime.Registry) Option
func WithParallelism ¶
func WithProfiles ¶
type ScheduleResult ¶
type ScheduleResult struct { // UID of the selected worker. SuggestedHost string // The number of workers the scheduler evaluated the stage against in the filtering // phase and beyond. EvaluatedWorkers int // The number of workers out of the evaluated ones that fit the stage. FeasibleWorkers int }
ScheduleResult represents the result of scheduling a stage.
type Scheduler ¶
type Scheduler struct { Cache cache.Cache Extenders []framework.Extender NextStage func() *framework.QueuedStageInfo Error func(*framework.QueuedStageInfo, error) ScheduleStage func(ctx context.Context, fwk framework.Framework, state *framework.CycleState, stage *meta.Stage) (ScheduleResult, error) StopEverything <-chan struct{} SchedulingQueue queue.SchedulingQueue // Profiles are the scheduling profiles. Profiles map[string]framework.Framework // contains filtered or unexported fields }