-
Notifications
You must be signed in to change notification settings - Fork 2k
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 annotations for controlling request rate limiting #4660
Add annotations for controlling request rate limiting #4660
Conversation
@dbaumgarten could you please fix conflicts and push updates? |
9afd681
to
584f8a0
Compare
@dbaumgarten could you please resolve conflicts and push updates? |
Hi @dbaumgarten I pulled down your PR and it worked well! One suggestion I have is that you can align the annotation names to the corresponding fields of the existing VirtuaServer rateLimit policy instead of the underlying NGINX directives, e.g. Another thing I noticed is that, the |
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.
Left one question regarding validation.
@haywoodsh aligning the annotations with the keys of VirtualServer sounds like a good idea. Will do. @jjngx Validating if the string ends in a proper unit should be pretty simple. Necessary or not it might save some people some headaches |
@dbaumgarten thank you for contributing! Could you please add validators and positive and negative tests for requests limiting and zone sizes annotations? The rules (suffixes) are listed here. |
Hi @dbaumgarten, heres info from some manual testing I did which should help you in the validation for the |
584f8a0
to
feb498f
Compare
👷 Deploy request for nginx-kubernetes-ingress pending review.Visit the deploys page to approve it
|
feb498f
to
54df210
Compare
Hi, |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4660 +/- ##
==========================================
+ Coverage 52.11% 52.31% +0.19%
==========================================
Files 60 60
Lines 17394 17501 +107
==========================================
+ Hits 9065 9155 +90
- Misses 8011 8018 +7
- Partials 318 328 +10 ☔ View full report in Codecov by Sentry. |
Hi @dbaumgarten, looks good to me so far. Just failing the lint. Can you install
|
1a1746d
to
e0e6793
Compare
I fixed the linter-findings. |
I'm ok with this @dbaumgarten as the cyclometric complexity is coming from linear if's, rather than nested ifs, and this feature had a lot of annotations. So thats fine IMO. As @jjngx pointed out, can you change the Other than that its good to go imo |
e0e6793
to
b26fb39
Compare
Okay, I hope I found all remaining t.Errorfs ^^ |
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.
👍🏻 thanks for contributing @dbaumgarten
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 on the documentation side.
b26fb39
to
ce6f774
Compare
There is so much going on on main, the PR is effectively always outdated... |
Proposed changes
This implements #4603.
Ingress resources can now have annotations to control request-rate-limiting.
Key points:
Checklist
Before creating a PR, run through this checklist and mark each as complete.