Commit Graph

3 Commits

Author SHA1 Message Date
Daniel Gutowski 4930cf3742 Revert commit 3ad77e8341
This was meant to be used as a signal that the estimation
did consider all of the pods, but x13n pointed out that
other k8s primitives may also limit it so the best option
is to compare a list of estimated pods.
2023-04-27 06:04:11 -07:00
Daniel Gutowski 3ad77e8341 Add new method 'ReachedLimit' to EstimationLimiter
This method will allow CA to check if any the limiter
blocked addition of any new Node.
2023-04-18 00:54:47 -07:00
Maciek Pytel ab891418f6 Limit binpacking based on #new_nodes or time
The binpacking algorithm is O(#pending_pods * #new_nodes) and
calculating a very large scale-up can get stuck for minutes or even
hours, leading to CA failing it's healthcheck and going down.
The new limiting prevents this scenario by stopping binpacking after
reaching specified threshold. Any pods that remain pending as a result
of shorter binpacking will be processed next autoscaler loop.

The thresholds used can be controlled with newly introduced flags:
--max-nodes-per-scaleup and --max-nodegroup-binpacking-duration. The
limiting can be disabled by setting both flags to 0 (not recommended,
especially for --max-nodegroup-binpacking-duration).
2022-06-20 17:02:51 +02:00