-
Notifications
You must be signed in to change notification settings - Fork 33
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
Simplify RateLimitPolicy #144
Conversation
1df7e2c
to
7c6619b
Compare
a759480
to
a2372f3
Compare
d10d3d1
to
e8a9fa8
Compare
ready for review @Kuadrant/engineering |
@eguzki I don't feel qualified to approve the PR but I love this change and take a look through it looks reasonable |
The verification steps are working 👍🏼 |
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 addressing the comments. I think this is only still relevant, but even so I'm guessing it won't matter for too long.
Verification steps work. Approved.
What
Make some fields of the RateLimitPolicy optional to make the required CR object smaller and simpler. After this changes, the simplest RLP instance looks like this:
Only
targetRef
and one limit object is required. Furthermore, the limit object does not requireconditions
andvariables
fields.When the Kuadrant control plane finds a rate limit policy that does not specify any action configuration, the Kuadrant control plane
will assign a generic default action configuration for the traffic related to the targeted network resource. This default action configuration allows defining global limits for all the traffic related to the targeted network resource.
[BREAKING CHANGE] (or maybe not). Technically this is breaking the current v1beta1 API. However, I do not expect issues at all. The changes switch some fields from required to optional. Thus, any existing "old" RLP instance will still be valid with the "new" CRD. No need to conversion either.
TODO:
Fixes #133
Verification steps
run dev env
Create kuadrant CR
Deploy toystore upstream service
Create HTTPRoute
Check toystore HTTPRoute works
It should return
200 OK
.Create simplified RLP
Wait for the policy to be available (and avoid possible errors)
Validating the rate limit policy
Only 5 requests every 10 secs on rate-limited.toystore.com allowed.