You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Kubernetes Horizontal Pod Autoscaler (HPA) has a default tolerance of 0.1. In EHPA, the cron-based scaling may not scale up or down to the desired number of replicas. For example, if the scheduled scaling is set to 24 replicas but it only scales up to 22, the calculation becomes 24/22 = 1.09. Since 0.09 falls within the tolerance range, it stops further scaling.
In my opinion, if the tolerance is set and it is really needed, there is no requirement for the specific number of instances (22 or 24 is fine). So we don't need to change it, just doc it.
In other scenarios, a precise number of instances is really needed, we can set specficReplicas based on cron rules. At this time, because a precise number of instances is required, the feature provided by cronHPA that can work together with cron rules and other indicators is no longer needed.
We can provide an option in cron to indicate whether we need to strictly follow cron rules. @qmhu
Describe the bug
The Kubernetes Horizontal Pod Autoscaler (HPA) has a default tolerance of 0.1. In EHPA, the cron-based scaling may not scale up or down to the desired number of replicas. For example, if the scheduled scaling is set to 24 replicas but it only scales up to 22, the calculation becomes 24/22 = 1.09. Since 0.09 falls within the tolerance range, it stops further scaling.
cron about code:
crane/pkg/controller/ehpa/hpa.go
Line 307 in 2a3f5ed
globally-configurable tolerance:
https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Reproduce steps
Expected behavior
Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: