defaultevictor

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: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PluginName = "DefaultEvictor"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder()

	AddToScheme = localSchemeBuilder.AddToScheme
)

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

New builds plugin from its arguments while passing a handle

func RegisterDefaults added in v0.26.0

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func SetDefaults_DefaultEvictorArgs added in v0.26.0

func SetDefaults_DefaultEvictorArgs(obj runtime.Object)

SetDefaults_DefaultEvictorArgs TODO: the final default values would be discussed in community

func ValidateDefaultEvictorArgs added in v0.27.0

func ValidateDefaultEvictorArgs(obj runtime.Object) error

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

func (*DefaultEvictor) PreEvictionFilter added in v0.26.0

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

type DefaultEvictorArgs

type DefaultEvictorArgs struct {
	metav1.TypeMeta `json:",inline"`

	NodeSelector            string                 `json:"nodeSelector"`
	EvictLocalStoragePods   bool                   `json:"evictLocalStoragePods"`
	EvictSystemCriticalPods bool                   `json:"evictSystemCriticalPods"`
	IgnorePvcPods           bool                   `json:"ignorePvcPods"`
	EvictFailedBarePods     bool                   `json:"evictFailedBarePods"`
	LabelSelector           *metav1.LabelSelector  `json:"labelSelector"`
	PriorityThreshold       *api.PriorityThreshold `json:"priorityThreshold"`
	NodeFit                 bool                   `json:"nodeFit"`
}

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