evictions

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodEvictor

type PodEvictor struct {
	*util.UnschedulableCache
	CheckUnschedulablePods bool
	sync.RWMutex
	// contains filtered or unexported fields
}

PodEvictor is used for evicting pods

func NewPodEvictor

func NewPodEvictor(
	client clientset.Interface,
	policyGroupVersion string,
	maxPodsToEvict int,
	nodes []*v1.Node, unschedulableCache *util.UnschedulableCache) *PodEvictor

NewPodEvictor init a new evictor

func (*PodEvictor) EvictPod

func (pe *PodEvictor) EvictPod(ctx context.Context, pod *v1.Pod, node *v1.Node) (bool, error)

EvictPod returns non-nil error only when evicting a pod on a node is not possible (due to maxPodsToEvict constraint). Success is true when the pod is evicted on the server side.

func (*PodEvictor) NodeEvicted

func (pe *PodEvictor) NodeEvicted(node *v1.Node) int

NodeEvicted gives a number of pods evicted for node

func (*PodEvictor) TotalEvicted

func (pe *PodEvictor) TotalEvicted() int

TotalEvicted gives a number of pods evicted through all nodes

Jump to

Keyboard shortcuts

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