Documentation ¶
Index ¶
- Constants
- func NewSTSScheduler(h framework.Handle, l Labels) (framework.Plugin, error)
- type Labels
- type STSScheduler
- func (s *STSScheduler) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (s *STSScheduler) Name() string
- func (s *STSScheduler) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
- func (s *STSScheduler) PreFilterExtensions() framework.PreFilterExtensions
Constants ¶
View Source
const Name = "StatefulSetScheduler"
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)"` //nolint:lll Node string `envconfig:"node" required:"true" desc:"Label to match for a Node to be considered suitable for scheduling a Pod"` //nolint:lll }
Labels holds the labels configuration for the STSScheduler.
type STSScheduler ¶
STSScheduler is a plugin that implements sorting based on the pod index and node's label match.
func (*STSScheduler) Filter ¶
func (s *STSScheduler) Filter( ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo, ) *framework.Status
Filter is invoked at the filter extension point to check if a node satisfies the scheduling requirements imposed by the STSScheduler plugin.
func (*STSScheduler) PreFilter ¶
func (s *STSScheduler) PreFilter( ctx context.Context, state *framework.CycleState, pod *v1.Pod, ) (*framework.PreFilterResult, *framework.Status)
PreFilter is invoked at the prefilter extension point to check if a pod can be scheduled based on the specific requirements such as labels and the type of workload it belongs to.
func (*STSScheduler) PreFilterExtensions ¶
func (s *STSScheduler) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions returns nil as the STSScheduler does not have a PreFilterExtensions.
Click to show internal directories.
Click to hide internal directories.