Add OpenSearch scaler#7540
Conversation
|
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. |
0dcc47b to
3f3076f
Compare
a8d069a to
c49e502
Compare
|
| Status | Scan Engine | Total (0) | ||||
|---|---|---|---|---|---|---|
| Open Source Security | 0 | 0 | 0 | 0 | See details |
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.
9d64997 to
bbaf9d2
Compare
|
Running the e2e is purely for early feedback; I have not yet conducted a review. |
|
/run-e2e opensearch |
|
/run-e2e opensearch |
|
A quick tip: it is not necessary to merge every change in the main branch into this pull request. We will review this pull request at a later date. Because KubeCon is coming up, we are a bit busier. The review will probably take place after that. If necessary, we will merge the main branch. |
|
Hi @rickbrouwer I wanted to follow up on the current pull request. I just wanted to check in — do you have a rough idea of when you might have time to take a look? Thanks! |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new OpenSearch scaler (inspired by the existing Elasticsearch scaler) and wires it into the scaler builder, along with unit + e2e coverage and a changelog entry.
Changes:
- Introduce
opensearchscaler implementation and register it in the scaler builder - Add unit tests for metadata parsing/validation and client creation
- Add e2e tests and update dependencies + changelog
Reviewed changes
Copilot reviewed 6 out of 349 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/scaling/scalers_builder.go |
Registers the new opensearch trigger type with the scaler factory. |
pkg/scalers/opensearch_scaler.go |
Implements OpenSearch scaler: metadata parsing/validation, client setup, query execution, metric extraction. |
pkg/scalers/opensearch_scaler_test.go |
Adds unit tests for metadata validation/parsing and HTTP/TLS client behavior. |
tests/scalers/opensearch/opensearch_test.go |
Adds e2e coverage for query and search-template modes against an in-cluster OpenSearch. |
go.mod |
Adds OpenSearch Go client dependency. |
CHANGELOG.md |
Adds a “New” changelog entry for the OpenSearch scaler. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5d803b9 to
18d9de2
Compare
|
Please run 'make generate-scalers-schema' |
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Co-authored-by: semgrep-code-kedacore[bot] <258932899+semgrep-code-kedacore[bot]@users.noreply.github.com> Signed-off-by: Antoni <antek.pstras@gmail.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
18d9de2 to
7ea643d
Compare
|
/run-e2e opensearch |
|
I think I have a few final questions/comments. I did some comparisons with the ElasticSearch scaler, because I think it should be reasonably similar to this one. Is there a specific reason to use Further, is Is making Last thing, |
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
|
thanks for the comment and for spotting these issues
|
Signed-off-by: Antoni Pstraś <antoni.pstras@sap.com>
|
/run-e2e opensearch |
rickbrouwer
left a comment
There was a problem hiding this comment.
I think we're all set now. Thanks!
OpenSearchscalerChecklist
make generate-scalers-schemahas been run to update any outdated generated filesFixes #7456
keda-docs: kedacore/keda-docs#1718