scheduler

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultScheduler defines the name of default scheduler.
	DefaultScheduler = "default-scheduler"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.2.0

type Option func(*schedulerOptions)

Option configures a Scheduler

func WithDisableSchedulerEstimatorInPullMode added in v1.3.0

func WithDisableSchedulerEstimatorInPullMode(disableSchedulerEstimatorInPullMode bool) Option

WithDisableSchedulerEstimatorInPullMode sets the disableSchedulerEstimatorInPullMode for scheduler

func WithEnableEmptyWorkloadPropagation added in v1.3.0

func WithEnableEmptyWorkloadPropagation(enableEmptyWorkloadPropagation bool) Option

WithEnableEmptyWorkloadPropagation sets the enablePropagateEmptyWorkLoad for scheduler

func WithEnableSchedulerEstimator added in v1.2.0

func WithEnableSchedulerEstimator(enableSchedulerEstimator bool) Option

WithEnableSchedulerEstimator sets the enableSchedulerEstimator for scheduler

func WithEnableSchedulerPlugin added in v1.3.0

func WithEnableSchedulerPlugin(plugins []string) Option

WithEnableSchedulerPlugin sets the scheduler-plugin for scheduler

func WithOutOfTreeRegistry added in v1.3.0

func WithOutOfTreeRegistry(registry runtime.Registry) Option

WithOutOfTreeRegistry sets the registry for out-of-tree plugins. Those plugins will be appended to the default in-tree registry.

func WithRateLimiterOptions added in v1.8.0

func WithRateLimiterOptions(rateLimiterOptions ratelimiterflag.Options) Option

WithRateLimiterOptions sets the rateLimiterOptions for scheduler

func WithSchedulerEstimatorPort added in v1.2.0

func WithSchedulerEstimatorPort(schedulerEstimatorPort int) Option

WithSchedulerEstimatorPort sets the schedulerEstimatorPort for scheduler

func WithSchedulerEstimatorServicePrefix added in v1.4.0

func WithSchedulerEstimatorServicePrefix(schedulerEstimatorServicePrefix string) Option

WithSchedulerEstimatorServicePrefix sets the schedulerEstimatorServicePrefix for scheduler

func WithSchedulerEstimatorTimeout added in v1.2.0

func WithSchedulerEstimatorTimeout(schedulerEstimatorTimeout metav1.Duration) Option

WithSchedulerEstimatorTimeout sets the schedulerEstimatorTimeout for scheduler

func WithSchedulerName added in v1.5.0

func WithSchedulerName(schedulerName string) Option

WithSchedulerName sets the schedulerName for scheduler

type ScheduleType added in v0.4.0

type ScheduleType string

ScheduleType defines the schedule type of a binding object should be performed.

const (
	// ReconcileSchedule means the binding object associated policy has been changed.
	ReconcileSchedule ScheduleType = "ReconcileSchedule"

	// ScaleSchedule means the replicas of binding object has been changed.
	ScaleSchedule ScheduleType = "ScaleSchedule"
)

type Scheduler

type Scheduler struct {
	DynamicClient dynamic.Interface
	KarmadaClient karmadaclientset.Interface
	KubeClient    kubernetes.Interface

	Algorithm core.ScheduleAlgorithm
	// contains filtered or unexported fields
}

Scheduler is the scheduler schema, which is used to schedule a specific resource to specific clusters

func NewScheduler

func NewScheduler(dynamicClient dynamic.Interface, karmadaClient karmadaclientset.Interface, kubeClient kubernetes.Interface, opts ...Option) (*Scheduler, error)

NewScheduler instantiates a scheduler

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context)

Run runs the scheduler

Directories

Path Synopsis
testing
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL