make hpa upscale and downscale delay window configurable

This commit is contained in:
Dmitry1987
2017-02-18 10:32:38 +00:00
parent 92f8d9be38
commit 965dab366b
7 changed files with 70 additions and 45 deletions

View File

@@ -518,6 +518,8 @@ func (tc *testCase) runTest(t *testing.T) {
}
informerFactory := informers.NewSharedInformerFactory(testClient, controller.NoResyncPeriodFunc())
defaultUpscaleForbiddenWindow := 3 * time.Minute
defaultDownscaleForbiddenWindow := 5 * time.Minute
hpaController := NewHorizontalController(
eventClient.Core(),
@@ -526,6 +528,8 @@ func (tc *testCase) runTest(t *testing.T) {
replicaCalc,
informerFactory.Autoscaling().V1().HorizontalPodAutoscalers(),
controller.NoResyncPeriodFunc(),
defaultUpscaleForbiddenWindow,
defaultDownscaleForbiddenWindow,
)
hpaController.hpaListerSynced = alwaysReady