mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user