-
Notifications
You must be signed in to change notification settings - Fork 8
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 sample application and README file #10
Conversation
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Tagging @pragnagopa, @TsuyoshiUshio, @divyagandhisethi, @ealsur, @lpapudippu |
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
@ahmelsayed, @tomkerkhove - Can you please review the PR? |
@ahmelsayed, @tomkerkhove - Gentle reminder for PR review. |
I just got back from holiday and will review asap |
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.
I did a first skip but have a few high-level remarks:
- The README does not provide documentation on what the scaler itself does and how it helps the customer. You should provide guidance on what it is, how to deploy and how to configure a ScaledObject
- The scaler project was renamed, what was the reasoning for this as the previous naming convention (
CosmosDb.Scaler
) was a lot better imo - The repo needs a bit more structure, can you please introduce the following folders please?
src/
for the external scaler codesamples/
for the sample code and README to provide guidance how to run the sample
- We should explicitly document that this is purely for Changefeed and not the rest
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
@tomkerkhove - Please review the updated PR when you have time.
|
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, a big improvement - Thanks a ton! End-users can now better understand how it works and if it's a fit for them.
Just made a remark on streamlining the SO metadata but rest looks fine 👌
@pragnagopa @ealsur Please take a final look |
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 !
Signed-off-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Ha, I have missed the last commit @JatinSanghvi. Would it be possible to change This is important for our scaler approach where people need to understand that it's an external scaler and follow the convention. THank you! |
@JatinSanghvi - please use same name in mcr as well. |
Sure @pragnagopa, I was going to use the same name to avoid chance of confusion. |
Checking the PR branch in forked repo: https://github.com/JatinSanghvi/keda-external-scaler-azure-cosmos-db (including the README file) might provide a better sense of the changes that were made
Checklist
Fixes
Addresses issue Provide GitHub Action to publish official image on GHCR #9 (need review to confirm)
Scales targets based on count of Cosmos DB container's partition-ranges with non-zero pending items. Existing implementation scales according to the estimate of items pending to be processed across all partitions, which is incorrect. Cosmos DB architecture limits the degree of parallelism of "processing new changes to the container" to the "number of logical partition ranges" (More information). The logical partition ranges is dependent on the physical partitions, which is turn depends on combination of container data storage size and container throughput (More information). For small containers with low throughput provisioned, we expect the scale targets to not scale beyond 1.
Fixes generation of metric names. Existing implementation generates the metric name in method
GetMetricSpec
but uses metric name from request metadata in methodGetMetrics
. If metric name is not specified inScaledObject
definition, returning metric name inGetMetricSpec
won't make the metric-name part of scaler metadata whenGetMetrics
is called. On other hand, if the metric name is supplied by user inScaledObject
definition,GetMetricSpec
would override the name, and KEDA won't be able to get the metrics for the generated metric-name when callingGetMetrics
. New implementation provides consistent behavior across methods. All methods will reuse the metric-name if provided by user, else generate one based on other 'required' properties inScaledObject
.Bases metric name generation based on lease container properties. The current metric-name generation logic will create same metric name if two different lease containers are created to monitor the same container.
Uses standard names as in Cosmos DB documentation for trigger properties.
Connection
insteadConnectionString
(matches with other KEDA scalers),ContainerId
instead ofCollectionName
andProcessorName
instead ofLeaseCollectionPrefix
.Other changes
Closes #2
Closes #3
Closes #9