kubernetes/pkg/controller/podautoscaler
Joseph Burnett 39c4875321 There are various reasons that the HPA will decide not the change the
current scale. Two important ones are when missing metrics might
change the direction of scaling, and when the recommended scale is
within tolerance of the current scale.

The way that ReplicaCalculator signals it's desire to not change the
current scale is by returning the current scale. However the current
scale is from scale.Status.Replicas and can be larger than
scale.Spec.Replicas (e.g. during Deployment rollout with configured
surge). This causes a positive feedback loop because
scale.Status.Replicas is written back into scale.Spec.Replicas,
further increasing the current scale.

This PR fixes the feedback loop by plumbing the replica count from
spec through horizontal.go and replica_calculator.go so the calculator
can punt with the right value.
2019-07-02 14:21:32 +02:00
..
config auto-generated file 2019-03-02 12:55:26 +08:00
metrics remove unused code 2019-04-19 08:36:31 -04:00
BUILD auto-generated file 2019-03-02 12:55:26 +08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
horizontal_test.go Add tests for handling scaling on unavailable metrics 2019-05-29 23:11:32 +01:00
horizontal.go There are various reasons that the HPA will decide not the change the 2019-07-02 14:21:32 +02:00
legacy_horizontal_test.go Fix potential test flakes in HPA tests TestEventNotCreated and TestAvoidUncessaryUpdates 2019-04-17 08:10:33 -06:00
legacy_replica_calculator_test.go Use informer cache instead of active pod gets in HPA controller. 2018-09-05 11:31:27 +02:00
OWNERS Prune directxman12 from metrics/autoscaling OWNERS 2019-04-03 16:24:51 -07:00
rate_limiters.go Fix typos like limitting 2018-12-04 11:01:40 +08:00
replica_calculator_test.go There are various reasons that the HPA will decide not the change the 2019-07-02 14:21:32 +02:00
replica_calculator.go There are various reasons that the HPA will decide not the change the 2019-07-02 14:21:32 +02:00