predicates

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// UnableToRunOnPreviousNodeReason represents the reason of event that we
	// cannot schedule the new pod of component member to its previous node.
	UnableToRunOnPreviousNodeReason = "UnableToRunOnPreviousNode"
)

Variables

This section is empty.

Functions

func CollectEvents added in v1.0.6

func CollectEvents(source <-chan string) []string

func GetNodeNames added in v1.0.0

func GetNodeNames(nodes []apiv1.Node) []string

Types

type FakePredicate added in v1.1.0

type FakePredicate struct {
	FakeName string
	Nodes    []v1.Node
	Err      error
}

func NewFakePredicate added in v1.1.0

func NewFakePredicate(name string, nodes []v1.Node, err error) *FakePredicate

func (*FakePredicate) Filter added in v1.1.0

func (f *FakePredicate) Filter(_ string, _ *v1.Pod, nodes []v1.Node) ([]v1.Node, error)

func (*FakePredicate) Name added in v1.1.0

func (f *FakePredicate) Name() string

type Predicate

type Predicate interface {
	// Name return the predicate name
	Name() string

	// Filter function receives a set of nodes and returns a set of candidate nodes.
	Filter(string, *apiv1.Pod, []apiv1.Node) ([]apiv1.Node, error)
}

Predicate is an interface as extender-implemented predicate functions

func NewHA

func NewHA(kubeCli kubernetes.Interface, cli versioned.Interface) Predicate

NewHA returns a Predicate

func NewStableScheduling added in v1.0.0

func NewStableScheduling(kubeCli kubernetes.Interface, cli versioned.Interface) Predicate

NewStableScheduling returns a Predicate

Jump to

Keyboard shortcuts

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