types

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalancePlugin

type BalancePlugin interface {
	Plugin
	Balance(ctx context.Context, nodes []*v1.Node) *Status
}

BalancePlugin defines an extension point for balancing pods across a cluster

type DeschedulePlugin

type DeschedulePlugin interface {
	Plugin
	Deschedule(ctx context.Context, nodes []*v1.Node) *Status
}

DeschedulePlugin defines an extension point for a general descheduling operation

type Evictor

type Evictor interface {
	// Filter checks if a pod can be evicted
	Filter(*v1.Pod) bool
	// PreEvictionFilter checks if pod can be evicted right before eviction
	PreEvictionFilter(*v1.Pod) bool
	// Evict evicts a pod (no pre-check performed)
	Evict(context.Context, *v1.Pod, evictions.EvictOptions) bool
	// NodeLimitExceeded checks if the number of evictions for a node was exceeded
	NodeLimitExceeded(node *v1.Node) bool
}

Evictor defines an interface for filtering and evicting pods while abstracting away the specific pod evictor/evictor filter.

type EvictorPlugin

type EvictorPlugin interface {
	Plugin
	Filter(pod *v1.Pod) bool
	PreEvictionFilter(pod *v1.Pod) bool
}

EvictorPlugin defines extension points for a general evictor behavior Even though we name this plugin interface EvictorPlugin, it does not actually evict anything, This plugin is only meant to customize other actions (extension points) of the evictor, like filtering, sorting, and other ones that might be relevant in the future

type ExtensionPoint

type ExtensionPoint string
const (
	DescheduleExtensionPoint        ExtensionPoint = "Deschedule"
	BalanceExtensionPoint           ExtensionPoint = "Balance"
	FilterExtensionPoint            ExtensionPoint = "Filter"
	PreEvictionFilterExtensionPoint ExtensionPoint = "PreEvictionFilter"
)

type Handle

type Handle interface {
	// ClientSet returns a kubernetes clientSet.
	ClientSet() clientset.Interface
	Evictor() Evictor
	GetPodsAssignedToNodeFunc() podutil.GetPodsAssignedToNodeFunc
	SharedInformerFactory() informers.SharedInformerFactory
}

Handle provides handles used by plugins to retrieve a kubernetes client set, evictor interface, shared informer factory and other instruments shared across plugins.

type Plugin

type Plugin interface {
	Name() string
}

Plugin is the parent type for all the descheduling framework plugins.

type Status

type Status struct {
	Err error
}

Status describes result of an extension point invocation

Jump to

Keyboard shortcuts

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