Parameterization for downscale, upscale, and tolerance with backsolving

unit test for visible testing of tolerance algorithm expectations. Logs for dScale, uScale, tol creation.
This commit is contained in:
Jay Vyas
2015-12-07 15:02:39 -05:00
parent dc4bc2a566
commit 5161d169ba
3 changed files with 104 additions and 24 deletions

View File

@@ -362,7 +362,11 @@ func (s *CMServer) Run(_ []string) error {
metrics.DefaultHeapsterService,
metrics.DefaultHeapsterPort,
)
podautoscaler.NewHorizontalController(hpaClient, metricsClient).
// TODO parameterize tolerance/downscale/upscale options.
tolerance := 1.0
downScale := time.Duration(5) * time.Second
upScale := time.Duration(3) * time.Second
podautoscaler.NewHorizontalController(kubeClient, metricsClient, tolerance, downScale, upScale).
Run(s.HorizontalPodAutoscalerSyncPeriod)
}