nodeutilization

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// MinResourcePercentage is the minimum value of a resource's percentage
	MinResourcePercentage = 0
	// MaxResourcePercentage is the maximum value of a resource's percentage
	MaxResourcePercentage = 100
)
View Source
const HighNodeUtilizationPluginName = "HighNodeUtilization"
View Source
const LowNodeUtilizationPluginName = "LowNodeUtilization"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder()

	AddToScheme = localSchemeBuilder.AddToScheme
)

Functions

func NewHighNodeUtilization

func NewHighNodeUtilization(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)

NewHighNodeUtilization builds plugin from its arguments while passing a handle

func NewLowNodeUtilization

func NewLowNodeUtilization(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)

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

func SetDefaults_HighNodeUtilizationArgs(obj runtime.Object)

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

func SetDefaults_LowNodeUtilizationArgs added in v0.26.0

func SetDefaults_LowNodeUtilizationArgs(obj runtime.Object)

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

func ValidateHighNodeUtilizationArgs added in v0.26.0

func ValidateHighNodeUtilizationArgs(obj runtime.Object) error

func ValidateLowNodeUtilizationArgs added in v0.26.0

func ValidateLowNodeUtilizationArgs(obj runtime.Object) error

Types

type HighNodeUtilization

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

func (*HighNodeUtilization) Balance

func (h *HighNodeUtilization) Balance(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status

Balance extension point implementation for the plugin

func (*HighNodeUtilization) Name

func (h *HighNodeUtilization) Name() string

Name retrieves the plugin name

type HighNodeUtilizationArgs added in v0.26.0

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

	Thresholds    api.ResourceThresholds `json:"thresholds"`
	NumberOfNodes int                    `json:"numberOfNodes,omitempty"`
	// Naming this one differently since namespaces are still
	// considered while considering resources used by pods
	// but then filtered out before eviction
	EvictableNamespaces *api.Namespaces `json:"evictableNamespaces,omitempty"`
}

func (*HighNodeUtilizationArgs) DeepCopy added in v0.26.0

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

func (*HighNodeUtilizationArgs) DeepCopyInto added in v0.26.0

func (in *HighNodeUtilizationArgs) DeepCopyInto(out *HighNodeUtilizationArgs)

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

func (*HighNodeUtilizationArgs) DeepCopyObject added in v0.26.0

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

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

type LowNodeUtilization

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

func (*LowNodeUtilization) Balance

func (l *LowNodeUtilization) Balance(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status

Balance extension point implementation for the plugin

func (*LowNodeUtilization) Name

func (l *LowNodeUtilization) Name() string

Name retrieves the plugin name

type LowNodeUtilizationArgs added in v0.26.0

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

	UseDeviationThresholds bool                   `json:"useDeviationThresholds,omitempty"`
	Thresholds             api.ResourceThresholds `json:"thresholds"`
	TargetThresholds       api.ResourceThresholds `json:"targetThresholds"`
	NumberOfNodes          int                    `json:"numberOfNodes,omitempty"`

	// Naming this one differently since namespaces are still
	// considered while considering resources used by pods
	// but then filtered out before eviction
	EvictableNamespaces *api.Namespaces `json:"evictableNamespaces,omitempty"`
}

func (*LowNodeUtilizationArgs) DeepCopy added in v0.26.0

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

func (*LowNodeUtilizationArgs) DeepCopyInto added in v0.26.0

func (in *LowNodeUtilizationArgs) DeepCopyInto(out *LowNodeUtilizationArgs)

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

func (*LowNodeUtilizationArgs) DeepCopyObject added in v0.26.0

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

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

type NodeInfo

type NodeInfo struct {
	NodeUsage
	// contains filtered or unexported fields
}

type NodePodsMap

type NodePodsMap map[*v1.Node][]*v1.Pod

NodePodsMap is a set of (node, pods) pairs

type NodeThresholds

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

type NodeUsage

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

NodeUsage stores a node's info, pods on it, thresholds and its resource usage

Jump to

Keyboard shortcuts

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