Documentation
¶
Index ¶
- Constants
- func NewScheduler(labels Labels) (framework.Plugin, error)
- type Labels
- type Scheduler
- func (s *Scheduler) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (s *Scheduler) Name() string
- func (s *Scheduler) PreEnqueue(_ context.Context, pod *v1.Pod) *framework.Status
- func (s *Scheduler) PreFilter(_ context.Context, _ *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
- func (s *Scheduler) PreFilterExtensions() framework.PreFilterExtensions
Constants ¶
View Source
const Name = "StatefulSetScheduler"
Name is the name of the plugin used in the plugin registry and configurations.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Labels ¶
type Labels struct { Pod []string `envconfig:"pod" required:"true" desc:"Labels for Pod to be considered by the StatefulSetScheduler (any of the list)"` Node string `envconfig:"node" required:"true" desc:"Label to match for a Node to be considered suitable for scheduling a Pod"` }
Labels holds the labels configuration for the Scheduler.
type Scheduler ¶ added in v0.2.0
type Scheduler struct {
Labels Labels
}
Scheduler is a plugin that implements sorting based on the pod index and node's label match.
func (*Scheduler) Filter ¶ added in v0.2.0
func (s *Scheduler) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
Filter checks if a node is suitable for scheduling the pod based on node labels and pod ordinal.
func (*Scheduler) PreEnqueue ¶ added in v0.2.0
PreEnqueue checks if the pod should be considered for scheduling.
func (*Scheduler) PreFilter ¶ added in v0.2.0
func (s *Scheduler) PreFilter(_ context.Context, _ *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
PreFilter checks if a pod can be scheduled based on its labels.
func (*Scheduler) PreFilterExtensions ¶ added in v0.2.0
func (s *Scheduler) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions returns nil as Scheduler does not have any prefilter extensions.
Click to show internal directories.
Click to hide internal directories.