-
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
Scale ratelimit with ingress pods #5113
Conversation
👷 Deploy request for nginx-kubernetes-ingress pending review.Visit the deploys page to approve it
|
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 docs-wise, but most of the PR is code-based, so I am not approving.
@shaun-nx What do you think? Does this look fine or are any changes required? |
Just an FYI as this has been lingering for review. |
d417459
to
33c3828
Compare
docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md
Outdated
Show resolved
Hide resolved
8489a7e
to
fbd67bd
Compare
Co-authored-by: Jim Ryan <[email protected]> Signed-off-by: dbaumgarten <[email protected]>
fbd67bd
to
bae7940
Compare
Rebased on current master and added a commit clarifying the docs about the limitations of this feature. |
Hi @dbaumgarten, thanks for following through, just an FYI that github actions are not working properly at the moment, that is why the tests are not running. https://www.githubstatus.com/ |
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 🚀
} | ||
} | ||
|
||
// handle virtualservers |
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.
@dbaumgarten something we observed in regression, the code below was causing panic when CRD flag was not set so we've wrapped it in
if lbc.areCustomResourcesEnabled {}
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.
Oh. Nice find.
Yes, wrapping it in that if sounds like a viable solution 👍
* Ratelimit Scaling for Ingresses * Added ratelimit scaling for VS * Testcases for ratelimit scaling * Fixed linter errors * Apply suggestions from code review Co-authored-by: Jim Ryan <[email protected]> Signed-off-by: dbaumgarten <[email protected]> * Clarify documentation about ratelimit-scaling feature --------- Signed-off-by: dbaumgarten <[email protected]> Co-authored-by: Jim Ryan <[email protected]>
Proposed changes
Implements #4894
Add a flag (in VS-Policy and in Ingress-Annotations) to enable ratelimit-scaling. If enabled, the configured ratelimit is divided by the number of currently active ingress-pods. This way the total sum of the ratelimit stays constant, even when autoscaling changes the number of nginx-ingress pods.
Checklist
Before creating a PR, run through this checklist and mark each as complete.