-
Notifications
You must be signed in to change notification settings - Fork 437
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
Reject ratelimit configs that are missing required values. #8575
Conversation
Issues linked to changelog: |
Visit the preview URL for this PR (updated for commit ace47d0): https://gloo-edge--pr8575-rlc-nil-check-ijvtnfyq.web.app (expires Mon, 21 Aug 2023 20:14:25 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 77c2b86e287749579b7ff9cadb81e099042ef677 |
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! Small nits but I'm happy to approve
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.
🚀
* plugin updates and test * gofmt * review comments, do not append invalid action to returned list * link to envoy docs in changelog
…PR action (#8582) * Reject ratelimit configs that are missing required values. (#8575) * plugin updates and test * gofmt * review comments, do not append invalid action to returned list * link to envoy docs in changelog * Fix solo-apis action and small addition to rlc translation fix. (#8581) * update changelog
…PR action (#8582) * Reject ratelimit configs that are missing required values. (#8575) * plugin updates and test * gofmt * review comments, do not append invalid action to returned list * link to envoy docs in changelog * Fix solo-apis action and small addition to rlc translation fix. (#8581) * update changelog
* plugin updates and test * gofmt * review comments, do not append invalid action to returned list * link to envoy docs in changelog
Description
Add checks for the presence of the required fields for ratelimit actions (spelled out here: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-ratelimit-action) in the rate limit plugins. Reject the config if they are empty instead of letting Envoy fail.
This change will also require updates in solo-projects and should not merge until those changes are tested
API changes
The proto is already annotated to require these fields but we don't pass that through to our CRDs.
Docs changes
Docs show that these fields are required based on proto, and this change is enforcing the requirements.
Context
I ran across this reproducing a different ratelimit translation issue and decided it was worth fixing.
Testing steps
Added unit test.
Manual testing and e2e test will happen on solo-projects PR.
Notes for reviewers
You can use the envoy docs for ratelimit actions to verify that I got everything: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-ratelimit-action
Checklist: