-
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
feat: add nsq scaler #6230
base: main
Are you sure you want to change the base?
feat: add nsq scaler #6230
Conversation
Semgrep found 7
Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'. Ignore this finding from no-direct-write-to-responsewriter.Semgrep found 20
use net.JoinHostPort instead of fmt.Sprintf(parsedURL.Port(), parsedURL.Hostname()) Ignore this finding from sprintf-host-port. |
bb102b3
to
7e342bd
Compare
Semgrep found 7
Detected 'Fprintf' or similar writing to 'http.ResponseWriter'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package to render data to users. Ignore this finding from no-fprintf-to-responsewriter. |
7d7ee13
to
32b9535
Compare
Signed-off-by: Matt Ulmer <[email protected]>
32b9535
to
063ca3d
Compare
@JorTurFer thanks for merging in kedacore/test-tools#175! I updated the code here to utilize the image that can be created from that PR. I also wanted to let you know that I have created the corresponding docs PR as well here: kedacore/keda-docs#1485 The last remaining TODO's seem to just be getting these CI checks to pass. Is it safe to ignore the remaining |
/run-e2e nsq |
I see the e2e tests have failed, but I'm wondering if the e2e test image (
I also noticed I had only updated one of the refs of my custom image to |
Signed-off-by: Matt Ulmer <[email protected]>
e43cf59
to
64f31ce
Compare
The image was created but GH creates them as private by default, now it's public |
/run-e2e nsq |
Do we need to update the policy to include any extra permission? https://github.com/kedacore/testing-infrastructure/blob/main/terraform/modules/aws/iam/main.tf#L88-L96 If yes, could you open a PR there? |
No additional permissions are required 👍 |
Signed-off-by: Matt Ulmer <[email protected]>
58dcc69
to
87b8815
Compare
@JorTurFer just wanted to check in and see if you need anything else before merging this in? |
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. I've kept some comments inline.
I'm worried about the lifecycle of the project, I closed the issue with the feature request a year and a half ago because there wasn't activity, and it looked as no longer maintained.
@zroubalik @wozniakjan
Signed-off-by: Matt Ulmer <[email protected]>
1dbec8b
to
54afb54
Compare
Signed-off-by: Matt Ulmer <[email protected]>
@JorTurFer thanks for taking a look! I believe I addressed all of your comments, but let me know if anything else needs to change of course.
I'm an engineer at Bitly, which is where NSQ was initially developed. We use it extensively throughout our stack, and while updates to the project are not as frequent as they were in the past, it is stable. There are plans for updates in the near future and it is under active development. |
Signed-off-by: Matt Ulmer <[email protected]>
/run-e2e nsq |
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! Awesome job! 🙇
@zroubalik @wozniakjan PTAL |
Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: Matt Ulmer <[email protected]>
@JorTurFer thanks for approving the PR and for your prompt feedback! |
/run-e2e nsq |
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, thank you!
not sure what is wrong with Semgrep / Analyze Semgrep
action, it doesn't allow me to see anything in there
Head branch was pushed to by a user without write access
Thanks for the review @wozniakjan ! @JorTurFer, I have updated this PR along with kedacore/docs#1485 to account for the 2.16 release that happened last week, PTAL! |
Signed-off-by: Matt Ulmer <[email protected]>
07f4d4a
to
b0d2bb5
Compare
This change adds a new scaler for NSQ, enabling auto-scaling based on topic/channel depth. The main components of NSQ that the scaler interacts with are nsqlookupd and nsqd. First the scaler makes /lookup requests to the
nsqlookupd
instances in the cluster to determine whichnsqd
instances have messages for the given topic. Then for eachnsqd
instance the scaler makes /stats requests to and aggregates the results to determine a final depth value.NSQ consumers create the channel they are reading if they do not exist. As such, if the channel does not exist on an
nsqd
host, the topic depth is used. The consumer pods that KEDA would be responsible in spawning would then create the channel.Checklist
Fixes #3281
Relates to: