Documentation ¶
Overview ¶
Package eviction is responsible for enforcing eviction thresholds to maintain node stability.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // PressureTransitionPeriod is duration the kubelet has to wait before transititioning out of a pressure condition. PressureTransitionPeriod time.Duration // Thresholds define the set of conditions monitored to trigger eviction. Thresholds []Threshold }
Config holds information about how eviction is configured.
type KillPodFunc ¶
KillPodFunc kills a pod. The pod status is updated, and then it is killed with the specified grace period. This function must block until either the pod is killed or an error is encountered. Arguments: pod - the pod to kill status - the desired status to associate with the pod (i.e. why its killed) gracePeriodOverride - the grace period override to use instead of what is on the pod spec
type Signal ¶
type Signal string
Signal defines a signal that can trigger eviction of pods on a node.
const ( // SignalMemoryAvailable is memory available (i.e. capacity - workingSet), in bytes. SignalMemoryAvailable Signal = "memory.available" )
type Threshold ¶
type Threshold struct { // Signal defines the entity that was measured. Signal Signal // Operator represents a relationship of a signal to a value. Operator ThresholdOperator // value is a quantity associated with the signal that is evaluated against the specified operator. Value resource.Quantity // GracePeriod represents the amount of time that a threshold must be met before eviction is triggered. GracePeriod time.Duration }
Threshold defines a metric for when eviction should occur.
func ParseThresholdConfig ¶
func ParseThresholdConfig(evictionHard, evictionSoft, evictionSoftGracePeriod string) ([]Threshold, error)
ParseThresholdConfig parses the flags for thresholds.
type ThresholdOperator ¶
type ThresholdOperator string
ThresholdOperator is the operator used to express a Threshold.
const ( // OpLessThan is the operator that expresses a less than operator. OpLessThan ThresholdOperator = "LessThan" )