evictionmanager

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 37 Imported by: 1

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 (
	MetricsNameVictimPodCNT           = "victims_cnt"
	MetricsNameRunningPodCNT          = "running_pod_cnt"
	MetricsNameCandidatePodCNT        = "candidate_pod_cnt"
	MetricsNameDryRunVictimPodCNT     = "dryrun_victims_cnt"
	MetricsNameRequestConditionCNT    = "request_condition_cnt"
	MetricsNameEvictionPluginCalled   = "eviction_plugin_called"
	MetricsNameEvictionPluginValidate = "eviction_plugin_validate"

	ValidateFailedReasonGetTokenFailed     = "get_token_failed"
	ValidateFailedReasonAuthenticateFailed = "authenticate_failed"
	ValidateFailedReasonNoPermission       = "no_permission"

	UserUnknown = "unknown"

	MetricsPodLabelPrefix = "pod"
)

Variables

View Source
var InnerEvictionPluginsDisabledByDefault = sets.NewString()

Functions

func NewInnerEvictionPluginInitializers

func NewInnerEvictionPluginInitializers() map[string]plugin.InitFunc

func NewPodKillerInitializers added in v0.4.0

func NewPodKillerInitializers() map[string]podkiller.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, error)

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