podlifetime

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const PluginName = "PodLifeTime"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder()

	AddToScheme = localSchemeBuilder.AddToScheme
)

Functions

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_PodLifeTimeArgs added in v0.26.0

func SetDefaults_PodLifeTimeArgs(obj runtime.Object)

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

func ValidatePodLifeTimeArgs added in v0.26.0

func ValidatePodLifeTimeArgs(obj runtime.Object) error

ValidatePodLifeTimeArgs validates PodLifeTime arguments

Types

type PodLifeTime

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

PodLifeTime evicts pods on the node that violate the max pod lifetime threshold

func (*PodLifeTime) Deschedule

func (d *PodLifeTime) Deschedule(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status

Deschedule extension point implementation for the plugin

func (*PodLifeTime) Name

func (d *PodLifeTime) Name() string

Name retrieves the plugin name

type PodLifeTimeArgs added in v0.26.0

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

	Namespaces            *api.Namespaces       `json:"namespaces"`
	LabelSelector         *metav1.LabelSelector `json:"labelSelector"`
	MaxPodLifeTimeSeconds *uint                 `json:"maxPodLifeTimeSeconds"`
	States                []string              `json:"states"`
}

PodLifeTimeArgs holds arguments used to configure PodLifeTime plugin.

func (*PodLifeTimeArgs) DeepCopy added in v0.26.0

func (in *PodLifeTimeArgs) DeepCopy() *PodLifeTimeArgs

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

func (*PodLifeTimeArgs) DeepCopyInto added in v0.26.0

func (in *PodLifeTimeArgs) DeepCopyInto(out *PodLifeTimeArgs)

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

func (*PodLifeTimeArgs) DeepCopyObject added in v0.26.0

func (in *PodLifeTimeArgs) 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