Skip to content

Commit 2e90d35

Browse files
mattjmcnaughtonRobertKrawitz
authored andcommitted
UPSTREAM: 54701: Refactor reconcileAutoscaler method in hpa
There have been a couple of recent bugs in the "normalizing" part of the `reconcileAutoscaler` method. This part of the code base is responsible for, among other things, taking the suggested desired replicas based on the metrics, ensuring it conforms to certain conditions, and updating it if it does not. Isolate the part that converts the desired replicas based on a given set of rules into its own function. We are refactoring this part of the code base to make the logic simpler and to make it easier to write unit tests.
1 parent 5a1cc4c commit 2e90d35

File tree

2 files changed

+137
-44
lines changed

2 files changed

+137
-44
lines changed

vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go

+70-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal_test.go

+67-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)