-
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
Add new Datadog scaler #2354
Add new Datadog scaler #2354
Conversation
Thank you for your PR! Would you mind opening a PR for docs as well please? |
And e2e tests please :) https://github.com/kedacore/keda/tree/main/tests |
PR for docs: kedacore/keda-docs#602 |
I will work on those. Thanks! |
Thanks both for the early feedback. I will be off next week. I will work on the e2e tests once I get back. Thanks again! |
Thanks and have a good week off! |
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 effort! ❤️
Apart from the e2e test, 2 small nits
Hello all! Thanks again for the reviews! I think I have addressed all comments and I have pushed the E2E tests. Let me know how we can do it to add the needed secrets to your pipeline. |
Hi @arapulido , |
/run-e2e datadog.test.* |
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.
Generally looking good, I have 2 questions:
- I can see that you are using
datadog-api-client-go/api/v1
, though it seems like there isv2
as well. Is there a particular reason to not usev2
? - Do you think you can use KEDA http client? (it allows setting a global timeout), seems like the datadog client might allow this: https://github.com/DataDog/datadog-api-client-go/blob/4cb420c458f3e0259afd11a0a918108ebd8cbd32/api/v1/datadog/client.go#L118-L121
Example usage of KEDA http client:keda/pkg/scalers/metrics_api_scaler.go
Line 75 in eeefb10
httpClient := kedautil.CreateHTTPClient(config.GlobalHTTPTimeout, false)
/run-e2e datadog.test.* |
/run-e2e datadog.test.* |
Hi @arapulido |
I cannot reproduce this failure in my environment. It is failing creating a secret, but not sure why. What would be the best way to debug this in the CI environment, @JorTurFer ? The line that fails the only thing it does is the following:
can you make sure that the env variables that populate the API and APP keys are not empty? Thanks! |
/run-e2e datadog.test.* |
The second one is noise because the namespace was terminating and that was why it failed. I think that the problem could be in the creation order, before the SO and then the secret. |
I use an endpoint (QueryMetrics) that is not yet available in v2.
Sure, I have now pushed a commit with this. Thanks! |
/run-e2e datadog.test.* |
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 a ton for the effort that you have done doing this PR ❤️ ❤️ ❤️
There is a conflict in CHANGELOG.md, could you solve it?
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>
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>
09c2fb5
to
43ce4d1
Compare
Done! I have rebased with main and resolved the conflict. Thanks a lot for the reviews and the help! |
/run-e2e datadog.test.* |
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
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! Great job :)
So good to see this being merged... thanks to all who contributed to make this happen 🙌 Is there a possibility to release this sooner, or v2.6.0 is only due to feb 24 as the milestone states? |
Hi @bmpandrade |
@bmpandrade we might actually do this release a little bit sooner, maybe end of this month. Be careful, consuming KEDA from |
Thank you both :) At this point, would be mostly for experimentation so we would be fine with ref |
@bmpandrade just an idea: for now, until the release, you could pull |
This PR adds a new Datadog scaler. Right now, it uses Datadog metrics to drive HPA, both on a target value and a target average value. In the future, it could grow to also allow to scale based on events, monitor statuses, etc.
Related docs PR: kedacore/keda-docs#602
This is an example of what the TriggerAuthentication and the ScaledObject definitions would look like:
Checklist
Relates to #1002