Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalancePlugin ¶
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) error }
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 MetricsCollector() *metricscollector.MetricsCollector }
Handle provides handles used by plugins to retrieve a kubernetes client set, evictor interface, shared informer factory and other instruments shared across plugins.