-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve the Datadog scaler, including a new optional parameter metricUnavailableValue
to fill data when no Datadog metric was returned
#2694
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution ❤️ ❤️
I have left some comments
@tomkerkhove I implemented here the @JorTurFer I addressed your comments Once this is approved, I will create a PR with the updated documentation The missing thing is |
The point here is that KEDA uses that method for getting if the scaler is active or not and that triggers things like scale from/to zero. If we return true always, KEDA thinks that the scaler is always active and will not scale to zero |
My question is: what do we mean by "a scaler is active"? |
I'm AFK but this is part of the info (from docs)
|
So it could be like: Of course, min replicas should be 0 for scaling to/from zero |
As I mentioned above: #2694 (comment) Active is when the target metric is above threshold. In this case a the value returned by |
@JorTurFer @zroubalik Thanks both! I have finally understood this :) I have added a commit for this, and I have also opened a PR to the Datadog scaler docs to improve the explanation related to polling intervals configuration, as it is fairly important to understand it, as it is directly affected by rate limits: kedacore/keda-docs#702 |
/run-e2e datadog* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for these improvements!
(I'll wait to merge till e2e passes and docs PR is ready to merge too)
e2e test has failed and also the workflow has failed because a needed rebase (rebasing main is not important at this moment if you don't want to do it, e2e test runs and only fails after it trying to clean up all namespaces). |
@JorTurFer Added a couple of changes to make the tests more resilient. Can we rerun, please? |
/run-e2e datadog* |
They have worked (again, ignore the error, it's because a rebase is needed for fixing it) As always, thanks a ton for you nice work ❤️ ❤️ ❤️ ❤️ |
@JorTurFer Thanks! I don't have plans to add anything for now, but I need to know whether this is going to be targeted for |
This change will be shipped as part of |
Cool! The corresponding docs PR is here: kedacore/keda-docs#710 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@arapulido could you please update the Changelog? then we can merge this one. thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rebase, there's a conflict in Changelog. Thanks!
f571306
to
2a5b681
Compare
… limiting Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
…ng a null metric, without blocking Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
…eturn that value as metric if the metric is not available for the time period selected Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
2a5b681
to
9a5a747
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
/run-e2e datadog* |
metricUnavailableValue
to fill data when no Datadog metric was returned
…vailableValue` to fill data when no Datadog metric was returned (kedacore#2694) Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com> Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Several non-breaking fixes for the Datadog scaler. Fixes #2657
The problem described in #2657 is partially caused by the selection of a time window that is too small (15 seconds). Datadog doesn't have that metric yet in many cases, and returns an empty value, that logs as a warning in the HPA.
To avoid this from happening often, the user should select a bigger window, and also added some retries before giving up. I also changed the documentation, to discourage reducing the time window: kedacore/keda-docs#682
To avoid this, we should remove the "age" parameter going forward, but as this is a breaking change, I will create a different PR for 2.7.
Other improvements in this PR:
Checklist
Fixes #2657