multischeduler

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "multi-scheduler"

Name is scheduler plugin name, will use in configuration file

Variables

This section is empty.

Functions

func New

func New(configuration *runtime.Unknown, f framework.FrameworkHandle) (framework.Plugin, error)

New initializes a new plugin and returns it.

Types

type ClusterConfigurations

type ClusterConfigurations struct {
	// ClusterConfiguration is a key-value map to store configuration
	ClusterConfiguration map[string]Configuration `json:"cluster_configuration"`
}

ClusterConfigurations defines the configurations of all the lower clusters

type Configuration

type Configuration struct {
	// clusterName
	Name string `json:"name"`
	// Master URL
	KubeMaster string `json:"kube_master,omitempty"`
	// KubeConfig of the cluster
	KubeConfig string `json:"kube_config,omitempty"`
}

Configuration defines the lower cluster configuration

type MultiSchedulingPlugin

type MultiSchedulingPlugin struct {
	// contains filtered or unexported fields
}

MultiSchedulingPlugin is plugin implemented scheduling framework

func (MultiSchedulingPlugin) Filter

func (m MultiSchedulingPlugin) Filter(pc *framework.PluginContext, pod *v1.Pod, nodeName string) *framework.Status

Filter check if a pod can run on node

func (MultiSchedulingPlugin) Name

func (m MultiSchedulingPlugin) Name() string

Name returns the plugin name

type Scheduler

type Scheduler struct {
	*scheduler.Scheduler
	// configuration of scheduler
	Config schedulerappconfig.Config
	// stop signal
	StopCh <-chan struct{}
}

Scheduler define the scheduler struct

func NewScheduler

func NewScheduler(cc schedulerappconfig.Config, stopCh <-chan struct{}) (*Scheduler, error)

NewScheduler executes the scheduler based on the given configuration. It only return on error or when stopCh is closed.

func (*Scheduler) Run

func (sched *Scheduler) Run() error

Run executes the scheduler based on the given configuration. It only return on error or when stopCh is closed.

Jump to

Keyboard shortcuts

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