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, // controlled by a single MPA object. NewPodsEvictionRestriction(pods []*apiv1.Pod, mpa *mpa_types.MultidimPodAutoscaler) PodsEvictionRestriction }
PodsEvictionRestrictionFactory creates PodsEvictionRestriction
func NewPodsEvictionRestrictionFactory ¶
func NewPodsEvictionRestrictionFactory(client kube_client.Interface, minReplicas int, evictionToleranceFraction float64) (PodsEvictionRestrictionFactory, error)
NewPodsEvictionRestrictionFactory creates PodsEvictionRestrictionFactory
Click to show internal directories.
Click to hide internal directories.