Documentation
¶
Index ¶
- Constants
- type EmptyPluginSet
- 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() (predicates.PredicateMetadataProducer, error)
- func (fc *FakeConfigurator) GetPredicates(predicateKeys sets.String) (map[string]predicates.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 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 // SchedulerError is the reason recorded for events when an error occurs during scheduling a pod. SchedulerError = "SchedulerError" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmptyPluginSet ¶
type EmptyPluginSet struct{}
EmptyPluginSet is the default plugin restirar used by the default scheduler.
func (EmptyPluginSet) Data ¶
func (r EmptyPluginSet) Data() *plugins.PluginData
Data returns a pointer to PluginData.
func (EmptyPluginSet) PrebindPlugins ¶
func (r EmptyPluginSet) PrebindPlugins() []plugins.PrebindPlugin
PrebindPlugins returns a slice of default prebind plugins.
func (EmptyPluginSet) ReservePlugins ¶
func (r EmptyPluginSet) ReservePlugins() []plugins.ReservePlugin
ReservePlugins returns a slice of default reserve plugins.
type FakeConfigurator ¶ added in v1.10.0
FakeConfigurator is an implementation for test.
func (*FakeConfigurator) Create ¶ added in v1.10.0
func (fc *FakeConfigurator) Create() (*factory.Config, error)
Create returns FakeConfigurator.Config
func (*FakeConfigurator) CreateFromConfig ¶ added in v1.10.0
func (fc *FakeConfigurator) CreateFromConfig(policy schedulerapi.Policy) (*factory.Config, error)
CreateFromConfig returns FakeConfigurator.Config
func (*FakeConfigurator) CreateFromKeys ¶ added in v1.10.0
func (fc *FakeConfigurator) CreateFromKeys(predicateKeys, priorityKeys sets.String, extenders []algorithm.SchedulerExtender) (*factory.Config, error)
CreateFromKeys returns FakeConfigurator.Config
func (*FakeConfigurator) CreateFromProvider ¶ added in v1.10.0
func (fc *FakeConfigurator) CreateFromProvider(providerName string) (*factory.Config, error)
CreateFromProvider returns FakeConfigurator.Config
func (*FakeConfigurator) GetClient ¶ added in v1.10.0
func (fc *FakeConfigurator) GetClient() clientset.Interface
GetClient is not implemented yet.
func (*FakeConfigurator) GetHardPodAffinitySymmetricWeight ¶ added in v1.10.0
func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int32
GetHardPodAffinitySymmetricWeight is not implemented yet.
func (*FakeConfigurator) GetNodeLister ¶ added in v1.10.0
func (fc *FakeConfigurator) GetNodeLister() corelisters.NodeLister
GetNodeLister is not implemented yet.
func (*FakeConfigurator) GetPredicateMetadataProducer ¶ added in v1.10.0
func (fc *FakeConfigurator) GetPredicateMetadataProducer() (predicates.PredicateMetadataProducer, error)
GetPredicateMetadataProducer is not implemented yet.
func (*FakeConfigurator) GetPredicates ¶ added in v1.10.0
func (fc *FakeConfigurator) GetPredicates(predicateKeys sets.String) (map[string]predicates.FitPredicate, error)
GetPredicates is not implemented yet.
func (*FakeConfigurator) GetScheduledPodLister ¶ added in v1.10.0
func (fc *FakeConfigurator) GetScheduledPodLister() corelisters.PodLister
GetScheduledPodLister is not implemented yet.
func (*FakeConfigurator) MakeDefaultErrorFunc ¶ added in v1.10.0
func (fc *FakeConfigurator) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue internalqueue.SchedulingQueue) func(pod *v1.Pod, err error)
MakeDefaultErrorFunc is not implemented yet.
type Option ¶ added in v1.13.0
type Option func(*schedulerOptions)
Option configures a Scheduler
func WithBindTimeoutSeconds ¶ added in v1.13.0
WithBindTimeoutSeconds sets bindTimeoutSeconds for Scheduler, the default value is 100
func WithHardPodAffinitySymmetricWeight ¶ added in v1.13.0
WithHardPodAffinitySymmetricWeight sets hardPodAffinitySymmetricWeight for Scheduler, the default value is 1
func WithName ¶ added in v1.13.0
WithName sets schedulerName for Scheduler, the default schedulerName is default-scheduler
func WithPercentageOfNodesToScore ¶ added in v1.13.0
WithPercentageOfNodesToScore sets percentageOfNodesToScore for Scheduler, the default value is 50
func WithPreemptionDisabled ¶ added in v1.13.0
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 ¶ added in v1.13.0
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, stopCh <-chan struct{}, opts ...func(o *schedulerOptions)) (*Scheduler, error)
New returns a Scheduler
func NewFromConfig ¶ added in v1.10.0
NewFromConfig returns a new scheduler using the provided Config.
func (*Scheduler) Cache ¶ added in v1.12.0
func (sched *Scheduler) Cache() schedulerinternalcache.Cache
Cache returns the cache in scheduler for test to check the data in 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
|
|
Package factory can set up a scheduler.
|
Package factory can set up a scheduler. |
internal
|
|