eviction

package
v0.0.0-...-34f7b3f Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: GPL-3.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodsEvictionRestriction

type PodsEvictionRestriction interface {
	// Evict sends eviction instruction to the api client.
	// Returns error if pod cannot be evicted or if client returned error.
	Evict(pod *apiv1.Pod, eventRecorder record.EventRecorder) error
	// CanEvict checks if pod can be safely evicted
	CanEvict(pod *apiv1.Pod) bool
}

PodsEvictionRestriction controls pods evictions. It ensures that we will not evict too many pods from one replica set. For replica set will allow to evict one pod or more if evictionToleranceFraction is configured.

type PodsEvictionRestrictionFactory

type PodsEvictionRestrictionFactory interface {
	// NewPodsEvictionRestriction creates PodsEvictionRestriction for given set of pods.
	NewPodsEvictionRestriction(pods []*apiv1.Pod) PodsEvictionRestriction
}

PodsEvictionRestrictionFactory creates PodsEvictionRestriction

func NewPodsEvictionRestrictionFactory

func NewPodsEvictionRestrictionFactory(client kube_client.Interface, minReplicas int,
	evictionToleranceFraction float64) (PodsEvictionRestrictionFactory, error)

NewPodsEvictionRestrictionFactory creates PodsEvictionRestrictionFactory

Jump to

Keyboard shortcuts

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