-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: apply fallback in polling loop to enable scaling from zero #7244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Rick Brouwer <[email protected]>
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
/run-e2e internals |
|
/run-e2e internals |
|
/run-e2e internals |
Signed-off-by: Rick Brouwer <[email protected]>
9a0f243 to
05a3da5
Compare
|
/run-e2e internals |
|
/run-e2e internals |
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e internals |
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e internals |
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e internals |
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e internals |
When a ScaledObject is scaled to zero and the scaler encounters an error, the fallback mechanism is only triggered during HPA metric requests via
GetScaledObjectMetrics, but not during the polling loop ingetScaledObjectState. This caused the ScaledObject to remain at zero replicas indefinitely when errors occurred, as the polling loop would continuously fail without activating the fallback, preventing HPA from ever being consulted.Fallback now works in both, HPA requests and polling interval checks.
The only question I have is whether it's by design that it doesn't switch to Fallback with 0 replicas, but I can't think of that myself. Please consider this when considering whether this was a deliberate choice. If not, I believe this PR resolves the issue.
Some extra new info;
It turned out to be a more change than I anticipated. I initially thought I'd add a simple fallback to
getScalerState, but it turned out that scalingModifiers started having issues.Therefore, I had to make some further adjustments to ensure the fallback worked properly from all positions.
Checklist
Fixes #7239