evictor

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelEvictPolicy = "koordinator.sh/evict-policy"

	AnnotationEvictReason  = "koordinator.sh/evict-reason"
	AnnotationEvictTrigger = "koordinator.sh/evict-trigger"
)
View Source
const (
	DeleteEvictorName = "Delete"
)
View Source
const (
	NativeEvictorName = "Eviction"
)
View Source
const (
	SoftEvictorName = "SoftEviction"
)

Variables

View Source
var (
	ErrTooManyEvictions = errors.New("TooManyEvictions")
)

Functions

func GetEvictionTriggerAndReason added in v1.1.1

func GetEvictionTriggerAndReason(annotations map[string]string) (string, string)

func RegisterEvictor

func RegisterEvictor(name string, factoryFn FactoryFn)

Types

type DeleteEvictor

type DeleteEvictor struct {
	// contains filtered or unexported fields
}

func (*DeleteEvictor) Evict

type FactoryFn

type FactoryFn func(client kubernetes.Interface) (Interface, error)

type Interface

type Interface interface {
	Evict(ctx context.Context, job *sev1alpha1.PodMigrationJob, pod *corev1.Pod) error
}

func NewDeleteEvictor

func NewDeleteEvictor(client kubernetes.Interface) (Interface, error)

func NewNativeEvictor

func NewNativeEvictor(client kubernetes.Interface) (Interface, error)

func NewSoftEvictor added in v1.2.0

func NewSoftEvictor(client kubernetes.Interface) (Interface, error)

type Interpreter

type Interpreter interface {
	Interface
}

func NewInterpreter

func NewInterpreter(handle framework.Handle, defaultEvictionPolicy string, evictQPS float32, evictBurst int) (Interpreter, error)

type NativeEvictor

type NativeEvictor struct {
	// contains filtered or unexported fields
}

func (*NativeEvictor) Evict

type SoftEvictor added in v1.2.0

type SoftEvictor struct {
	// contains filtered or unexported fields
}

func (*SoftEvictor) Evict added in v1.2.0

Jump to

Keyboard shortcuts

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