eviction

package
v0.0.0-...-a6372ab Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: Apache-2.0 Imports: 8 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.
	// Retrurns error if pod cannot be evicted or if client returned error.
	Evict(pod *apiv1.Pod) 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

NewPodsEvictionRestrictionFactory creates PodsEvictionRestrictionFactory

Jump to

Keyboard shortcuts

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