defaultevictor

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PluginName = "DefaultEvictor"
)

Variables

This section is empty.

Functions

func HaveEvictAnnotation

func HaveEvictAnnotation(pod *v1.Pod) bool

HaveEvictAnnotation checks if the pod have evict annotation

func IsPodEvictableBasedOnPriority

func IsPodEvictableBasedOnPriority(pod *v1.Pod, priority int32) bool

IsPodEvictableBasedOnPriority checks if the given pod is evictable based on priority resolved from pod Spec.

func New

func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)

New builds plugin from its arguments while passing a handle

Types

type DefaultEvictor

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

DefaultEvictor is the first EvictorPlugin, which defines the default extension points of the pre-baked evictor that is shipped. Even though we name this plugin DefaultEvictor, 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

func (*DefaultEvictor) Filter

func (d *DefaultEvictor) Filter(pod *v1.Pod) bool

func (*DefaultEvictor) Name

func (d *DefaultEvictor) Name() string

Name retrieves the plugin name

type DefaultEvictorArgs

type DefaultEvictorArgs struct {
	metav1.TypeMeta

	NodeSelector            string
	EvictLocalStoragePods   bool
	EvictSystemCriticalPods bool
	IgnorePvcPods           bool
	EvictFailedBarePods     bool
	LabelSelector           labels.Selector
	PriorityThreshold       *api.PriorityThreshold
	NodeFit                 bool
}

DefaultEvictorArgs holds arguments used to configure DefaultEvictor plugin.

func (*DefaultEvictorArgs) DeepCopy

func (in *DefaultEvictorArgs) DeepCopy() *DefaultEvictorArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultEvictorArgs.

func (*DefaultEvictorArgs) DeepCopyInto

func (in *DefaultEvictorArgs) DeepCopyInto(out *DefaultEvictorArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DefaultEvictorArgs) DeepCopyObject

func (in *DefaultEvictorArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

Jump to

Keyboard shortcuts

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