E2E tests for horizontal pod autoscaler.

Fixes & tuning in horiontal pod autoscaler and its e2e tests; two of the tests added to "Autoscaling suite".
This commit is contained in:
Jerzy Szczepkowski
2015-09-24 11:09:40 +02:00
parent ec0e1faab4
commit c8238c079a
7 changed files with 17 additions and 21 deletions

View File

@@ -34,9 +34,6 @@ import (
)
const (
heapsterNamespace = "kube-system"
heapsterService = "monitoring-heapster"
// Usage shoud exceed the tolerance before we start downscale or upscale the pods.
// TODO: make it a flag or HPA spec element.
tolerance = 0.1
@@ -48,8 +45,8 @@ type HorizontalController struct {
eventRecorder record.EventRecorder
}
var downscaleForbiddenWindow, _ = time.ParseDuration("20m")
var upscaleForbiddenWindow, _ = time.ParseDuration("3m")
var downscaleForbiddenWindow = 5 * time.Minute
var upscaleForbiddenWindow = 3 * time.Minute
func NewHorizontalController(client client.Interface, metricsClient metrics.MetricsClient) *HorizontalController {
broadcaster := record.NewBroadcaster()

View File

@@ -35,10 +35,10 @@ import (
const (
heapsterNamespace = "kube-system"
heapsterService = "monitoring-heapster"
heapsterService = "heapster"
)
var heapsterQueryStart, _ = time.ParseDuration("-5m")
var heapsterQueryStart = -5 * time.Minute
// An interface for getting metrics for pods.
type MetricsClient interface {