-
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 metric name creation to be unique using scaler index inside the scaler #2161
Improve metric name creation to be unique using scaler index inside the scaler #2161
Conversation
cafcbc3
to
6d697e4
Compare
2b43756
to
07abff3
Compare
Could you execute e2e test using this branch? I have tried several of them, but to be sure that they are working (and I don't have accounts to test all of them) |
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.
This is great!
We should have to go through the documentation and fix the example metric names (to include |
Ouch, I didn't think on that... I will review them but I think that the change is totally internal. I mean, if a user specify the metricName (ex, on postgresql), the external metric name will be sX-userMetricName. I will check it and probably we should add a note also in docs to refer this change. From KEDA pov is not important because the hpa will be recreated, but maybe some users are quering the metric directly and this could ba a breaking change. |
There are examples of the generated metric names in some scalers. For example here: https://keda.sh/docs/2.4/scalers/mongodb/ find on the page occurencies of
Yeah probably a section on HPA and metrics would be fine, with addition:
|
I will do it ASAP, after the netcoreconf last weekend, I have to earn "family points" xD. |
@JorTurFer oh boy :) no rush at all, family first. |
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.
Looking good, just nits
Looking good, the only thing I am not sure are potential consequences for External scaler, @ahmelsayed wdyt? |
Maybe we could let external scaler as it was before this change and delegate to the user to avoid collisions here 🤔 @zroubalik (IDK how you edited my comment xD): |
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
…calers Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
58ef90f
to
2ab64a6
Compare
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
…he scaler (kedacore#2161) Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com> Signed-off-by: nilayasiktoprak <nilayasiktoprak@gmail.com>
Signed-off-by: jorturfer jorge_turrado@hotmail.es
This draft shows the approach of using the scaler index as a prefix to ensure all metric names are unique in the ScaledObject during the scaler constructor. All the metric names will be composed using the pattern sX-currentMetricName where x is the index.
Checklist
Fixes #2123