Add eviction-pressure-transition-period flag to kubelet

This commit is contained in:
derekwaynecarr
2016-05-10 17:12:01 -04:00
parent 08440b5dcc
commit 2c01edf9ea
8 changed files with 55 additions and 33 deletions

View File

@@ -38,6 +38,14 @@ const (
OpLessThan ThresholdOperator = "LessThan"
)
// Config holds information about how eviction is configured.
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
}
// Threshold defines a metric for when eviction should occur.
type Threshold struct {
// Signal defines the entity that was measured.

View File

@@ -223,7 +223,7 @@ func NewMainKubelet(
containerRuntimeOptions []kubecontainer.Option,
hairpinMode string,
babysitDaemons bool,
thresholds []eviction.Threshold,
evictionConfig eviction.Config,
kubeOptions []Option,
) (*Kubelet, error) {
if rootDirectory == "" {