k3s/pkg/controller/podautoscaler
Joseph Burnett d881d48b2c 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-03 10:35:42 +02:00
..
metrics generated files 2018-12-19 11:19:12 -05:00
BUILD generated files 2018-12-19 11:19:12 -05:00
OWNERS Merge pull request #72525 from justinsb/owners_should_not_be_executable 2019-02-14 23:55:45 -08:00
doc.go
horizontal.go There are various reasons that the HPA will decide not the change the 2019-07-03 10:35:42 +02:00
horizontal_test.go Update client callers to use explicit versions 2019-02-26 08:36:30 -05:00
legacy_horizontal_test.go Update client callers to use explicit versions 2019-02-26 08:36:30 -05: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
rate_limiters.go Fix typos like limitting 2018-12-04 11:01:40 +08:00
replica_calculator.go There are various reasons that the HPA will decide not the change the 2019-07-03 10:35:42 +02:00
replica_calculator_test.go There are various reasons that the HPA will decide not the change the 2019-07-03 10:35:42 +02:00