evictionmanager

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package evictionmanager is the package that contains the libraries that drive the Kubelet binary. The kubelet is responsible for node level pod management. It runs on each worker in the cluster.

Index

Constants

View Source
const (
	EventReasonEvictFailed              = "EvictFailed"
	EventReasonEvictCreated             = "EvictCreated"
	EventReasonEvictExceededGracePeriod = "EvictExceededGracePeriod"
	EventReasonEvictSucceeded           = "EvictSucceeded"
)
View Source
const (
	MetricsNameVictimPodCNT       = "victims_cnt"
	MetricsNameRunningPodCNT      = "running_pod_cnt"
	MetricsNameCandidatePodCNT    = "candidate_pod_cnt"
	MetricsNameDryRunVictimPodCNT = "dryrun_victims_cnt"
	MetricsNameDryRunConditionCNT = "dryrun_condition_cnt"
)
View Source
const (
	EventActionEvicting = "Evicting"
)

Variables

View Source
var InnerEvictionPluginsDisabledByDefault = sets.NewString()

Functions

func NewInnerEvictionPluginInitializers

func NewInnerEvictionPluginInitializers() map[string]plugin.InitFunc

Types

type EvictionManger

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

EvictionManger reconciles to check if some threshold has been met, and trigger pod eviction actions if needed.

func NewEvictionManager

func NewEvictionManager(genericClient *client.GenericClientSet, recorder events.EventRecorder,
	metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter, conf *pkgconfig.Configuration) *EvictionManger

func (*EvictionManger) DeRegisterPlugin

func (m *EvictionManger) DeRegisterPlugin(pluginName string)

func (*EvictionManger) GetHandlerType

func (m *EvictionManger) GetHandlerType() string

func (*EvictionManger) RegisterPlugin

func (m *EvictionManger) RegisterPlugin(pluginName string, endpoint string, _ []string) error

func (*EvictionManger) Run

func (m *EvictionManger) Run(ctx context.Context)

func (*EvictionManger) ValidatePlugin

func (m *EvictionManger) ValidatePlugin(pluginName string, endpoint string, versions []string) error

ValidatePlugin validates a plugin if the version is correct and the name has the format of an extended resource

type LatestCNRGetter

type LatestCNRGetter func() *v1alpha1.CustomNodeResource

LatestCNRGetter returns the latest CNR resources.

type LatestPodsGetter

type LatestPodsGetter func() []*v1.Pod

LatestPodsGetter returns the latest pods that are running.

Directories

Path Synopsis
Package plugin is the package that defines the eviction strategy, and those strategies must implement EvictPlugin interface, supporting both embedded plugin and external registered plugin.
Package plugin is the package that defines the eviction strategy, and those strategies must implement EvictPlugin interface, supporting both embedded plugin and external registered plugin.

Jump to

Keyboard shortcuts

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