statefulset

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func NewScheduler added in v0.2.0

func NewScheduler(labels Labels) (framework.Plugin, error)

NewScheduler initializes and returns a new Scheduler plugin.

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) Name added in v0.2.0

func (s *Scheduler) Name() string

Name returns name of the plugin.

func (*Scheduler) PreEnqueue added in v0.2.0

func (s *Scheduler) PreEnqueue(_ context.Context, pod *v1.Pod) *framework.Status

PreEnqueue checks if the pod should be considered for scheduling.

func (*Scheduler) PreFilter added in v0.2.0

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.

Jump to

Keyboard shortcuts

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