Documentation ¶
Index ¶
- Constants
- Variables
- func HaveEvictAnnotation(pod *v1.Pod) bool
- func IsPodEvictableBasedOnPriority(pod *v1.Pod, priority int32) bool
- func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func RegisterDefaults(scheme *runtime.Scheme) error
- func SetDefaults_DefaultEvictorArgs(obj *DefaultEvictorArgs)
- func SetObjectDefaults_DefaultEvictorArgs(in *DefaultEvictorArgs)
- type DefaultEvictor
- type DefaultEvictorArgs
Constants ¶
const (
PluginName = "DefaultEvictor"
)
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder() AddToScheme = localSchemeBuilder.AddToScheme )
Functions ¶
func HaveEvictAnnotation ¶
HaveEvictAnnotation checks if the pod have evict annotation
func IsPodEvictableBasedOnPriority ¶
IsPodEvictableBasedOnPriority checks if the given pod is evictable based on priority resolved from pod Spec.
func RegisterDefaults ¶ added in v0.26.0
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 *DefaultEvictorArgs)
SetDefaults_DefaultEvictorArgs TODO: the final default values would be discussed in community
func SetObjectDefaults_DefaultEvictorArgs ¶ added in v0.26.0
func SetObjectDefaults_DefaultEvictorArgs(in *DefaultEvictorArgs)
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) 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.