Documentation ¶
Index ¶
- Constants
- type FakeConfigurator
- func (fc *FakeConfigurator) Create() (*factory.Config, error)
- func (fc *FakeConfigurator) CreateFromConfig(policy schedulerapi.Policy) (*factory.Config, error)
- func (fc *FakeConfigurator) CreateFromKeys(predicateKeys, priorityKeys sets.String, ...) (*factory.Config, error)
- func (fc *FakeConfigurator) CreateFromProvider(providerName string) (*factory.Config, error)
- func (fc *FakeConfigurator) GetClient() clientset.Interface
- func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int32
- func (fc *FakeConfigurator) GetNodeLister() corelisters.NodeLister
- func (fc *FakeConfigurator) GetPredicateMetadataProducer() (algorithm.PredicateMetadataProducer, error)
- func (fc *FakeConfigurator) GetPredicates(predicateKeys sets.String) (map[string]algorithm.FitPredicate, error)
- func (fc *FakeConfigurator) GetScheduledPodLister() corelisters.PodLister
- func (fc *FakeConfigurator) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue internalqueue.SchedulingQueue) func(pod *v1.Pod, err error)
- type Option
- func WithBindTimeoutSeconds(bindTimeoutSeconds int64) Option
- func WithEquivalenceClassCacheEnabled(enableEquivalenceClassCache bool) Option
- func WithHardPodAffinitySymmetricWeight(hardPodAffinitySymmetricWeight int32) Option
- func WithName(schedulerName string) Option
- func WithPercentageOfNodesToScore(percentageOfNodesToScore int32) Option
- func WithPreemptionDisabled(disablePreemption bool) Option
- type Scheduler
Constants ¶
const (
// BindTimeoutSeconds defines the default bind timeout
BindTimeoutSeconds = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeConfigurator ¶
FakeConfigurator is an implementation for test.
func (*FakeConfigurator) Create ¶
func (fc *FakeConfigurator) Create() (*factory.Config, error)
Create returns FakeConfigurator.Config
func (*FakeConfigurator) CreateFromConfig ¶
func (fc *FakeConfigurator) CreateFromConfig(policy schedulerapi.Policy) (*factory.Config, error)
CreateFromConfig returns FakeConfigurator.Config
func (*FakeConfigurator) CreateFromKeys ¶
func (fc *FakeConfigurator) CreateFromKeys(predicateKeys, priorityKeys sets.String, extenders []algorithm.SchedulerExtender) (*factory.Config, error)
CreateFromKeys returns FakeConfigurator.Config
func (*FakeConfigurator) CreateFromProvider ¶
func (fc *FakeConfigurator) CreateFromProvider(providerName string) (*factory.Config, error)
CreateFromProvider returns FakeConfigurator.Config
func (*FakeConfigurator) GetClient ¶
func (fc *FakeConfigurator) GetClient() clientset.Interface
GetClient is not implemented yet.
func (*FakeConfigurator) GetHardPodAffinitySymmetricWeight ¶
func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int32
GetHardPodAffinitySymmetricWeight is not implemented yet.
func (*FakeConfigurator) GetNodeLister ¶
func (fc *FakeConfigurator) GetNodeLister() corelisters.NodeLister
GetNodeLister is not implemented yet.
func (*FakeConfigurator) GetPredicateMetadataProducer ¶
func (fc *FakeConfigurator) GetPredicateMetadataProducer() (algorithm.PredicateMetadataProducer, error)
GetPredicateMetadataProducer is not implemented yet.
func (*FakeConfigurator) GetPredicates ¶
func (fc *FakeConfigurator) GetPredicates(predicateKeys sets.String) (map[string]algorithm.FitPredicate, error)
GetPredicates is not implemented yet.
func (*FakeConfigurator) GetScheduledPodLister ¶
func (fc *FakeConfigurator) GetScheduledPodLister() corelisters.PodLister
GetScheduledPodLister is not implemented yet.
func (*FakeConfigurator) MakeDefaultErrorFunc ¶
func (fc *FakeConfigurator) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue internalqueue.SchedulingQueue) func(pod *v1.Pod, err error)
MakeDefaultErrorFunc is not implemented yet.
type Option ¶
type Option func(*schedulerOptions)
Option configures a Scheduler
func WithBindTimeoutSeconds ¶
WithBindTimeoutSeconds sets bindTimeoutSeconds for Scheduler, the default value is 100
func WithEquivalenceClassCacheEnabled ¶
WithEquivalenceClassCacheEnabled sets enableEquivalenceClassCache for Scheduler, the default value is false
func WithHardPodAffinitySymmetricWeight ¶
WithHardPodAffinitySymmetricWeight sets hardPodAffinitySymmetricWeight for Scheduler, the default value is 1
func WithName ¶
WithName sets schedulerName for Scheduler, the default schedulerName is default-scheduler
func WithPercentageOfNodesToScore ¶
WithPercentageOfNodesToScore sets percentageOfNodesToScore for Scheduler, the default value is 50
func WithPreemptionDisabled ¶
WithPreemptionDisabled sets disablePreemption for Scheduler, the default value is false
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler watches for new unscheduled pods. It attempts to find nodes that they fit on and writes bindings back to the api server.
func New ¶
func New(client clientset.Interface, nodeInformer coreinformers.NodeInformer, podInformer coreinformers.PodInformer, pvInformer coreinformers.PersistentVolumeInformer, pvcInformer coreinformers.PersistentVolumeClaimInformer, replicationControllerInformer coreinformers.ReplicationControllerInformer, replicaSetInformer appsinformers.ReplicaSetInformer, statefulSetInformer appsinformers.StatefulSetInformer, serviceInformer coreinformers.ServiceInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, storageClassInformer storageinformers.StorageClassInformer, recorder record.EventRecorder, schedulerAlgorithmSource kubeschedulerconfig.SchedulerAlgorithmSource, opts ...func(o *schedulerOptions)) (*Scheduler, error)
New returns a Scheduler
func NewFromConfig ¶
NewFromConfig returns a new scheduler using the provided Config.
func NewFromConfigurator ¶
func NewFromConfigurator(c factory.Configurator, modifiers ...func(c *factory.Config)) (*Scheduler, error)
NewFromConfigurator returns a new scheduler that is created entirely by the Configurator. Assumes Create() is implemented. Supports intermediate Config mutation for now if you provide modifier functions which will run after Config is created.
func (*Scheduler) Cache ¶
func (sched *Scheduler) Cache() schedulerinternalcache.Cache
Cache returns the cache in scheduler for test to check the data in scheduler.
func (*Scheduler) Config ¶
Config returns scheduler's config pointer. It is exposed for testing purposes.
func (*Scheduler) Run ¶
func (sched *Scheduler) Run()
Run begins watching and scheduling. It waits for cache to be synced, then starts a goroutine and returns immediately.
func (*Scheduler) StopEverything ¶
func (sched *Scheduler) StopEverything()
StopEverything closes the scheduler config's StopEverything channel, to shut down the Scheduler.
Directories ¶
Path | Synopsis |
---|---|
Package algorithm contains a generic Scheduler interface and several implementations.
|
Package algorithm contains a generic Scheduler interface and several implementations. |
Package api contains scheduler API objects.
|
Package api contains scheduler API objects. |
v1
Package v1 contains scheduler API objects.
|
Package v1 contains scheduler API objects. |
apis
|
|
equivalence
Package equivalence defines Pod equivalence classes and the equivalence class cache.
|
Package equivalence defines Pod equivalence classes and the equivalence class cache. |
Package factory can set up a scheduler.
|
Package factory can set up a scheduler. |
internal
|
|