-
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
Artemis Scaler parses out broker config parameters in case restAPITemplate
is given
#2104
Artemis Scaler parses out broker config parameters in case restAPITemplate
is given
#2104
Conversation
…ig params Signed-off-by: Ritikaa96 <ritika@india.nec.com>
…r-restAPITemplate
@ahmelsayed @zroubalik PTAL |
Hi @zroubalik , @tomkerkhove , @balchua I've added the functionality to parse out the parameters from restApiTemplate. PTAL Now there are two options.
what do you suggest? |
I was wondering if there is a need to verify the |
Hi @balchua I've added verification if the parameters are given or not for the parser. If the parsing path is wrong and not valid generally the code will throw Error .Can you share any Example case for the wrong restAPITemplate so we can make sure it doesn't raise concern later on. |
Hi @Ritikaa96 just an invalid endpoint will do. I also recall someone tried to hook this up to ActiveMQ classic, which worked since the jmx output is similar to artemis. But the rest API template is different. The discussion was posted in slack. |
Hi @balchua @tomkerkhove @zroubalik , as we discussed in #2097 , the above change goes with allowing only one way at a time to provide the borkerConfig. If the use causes more maintenance issues then maybe we can go for second option and remove Please let me know what you think about removing restApiTemplate altogether as its already been generated from the default template. |
@balchua |
I didn't look at the details of activemq classic carefully tho. I am not sure about the deprecation policy of KEDA, coz removing the A PR to include activemq classic. 😃 |
@balchua yes i saw the code and changes. mostly are same, at least the restApiTemplate parser is so the real question is that if this change is acceptable or the maintainers wants to have some other changes because either way the code having both restapitemplate and broker config from metadata at the same time seems redundant as it is regenerated through the brokerConfig params while getting the metrics and also checking for the active state. |
I digged out why the rest endpoint was added. #986 |
@balchua I see. I might be wrong but it seems like we are still using the same default template to access the endpoint either way. as per this code here .
|
@balchua If the monitoring is done by the default restApi content anyways then it is possible the current users are only utilising the same for now which makes it redundant to regenerate the same API that's given by metadata.
What do you think? it will include every restAPITemplate's value, and our code won't regenerate the url without needing it. |
@Ritikaa96 i am ok with your proposal. So in short, if a user uses the |
@balchua thank you , so should i update the current code to this above ? |
Yes for me. 😃 |
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, could you please note this change in Changelog?
Hi @zroubalik , what do you think about the discussion above? I just tried, as per the discussion with @balchua , to make the repetitive regeneration of restAPiTemplate conditional but then if restAPITemplate is not valid it would throw an error for sure and it will depend on the user to confirm their input was correct. |
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
@ahmelsayed @zroubalik PTAL. I've added the change in CHANGELOG. I'd also like to know what is your opinion about the discussion above. My first preference would be having broker config parameters when |
@ahmelsayed @zroubalik |
restAPITemplate
is given
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
…mplate` is given (kedacore#2104) Signed-off-by: Ritikaa96 <ritika@india.nec.com> Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com> Signed-off-by: nilayasiktoprak <nilayasiktoprak@gmail.com>
Adding functionality to provide brokerConfig parameters in ActiveMQ Artemis scaler from restAPITemplate.
In reference to #2097
Checklist
Fixes #2097