-
Notifications
You must be signed in to change notification settings - Fork 170
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 conditions to rate-limit policy #839
Conversation
}, | ||
"operation": { | ||
"type": "object", | ||
"$id": "#/definitions/operation", |
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.
Can we define those in the policy manifest spec? And then just refer to those?
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.
You mean manifest-schema.json
?
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.
Yes. It could make the validation harder, but sharing those definitions would be good in my opinion.
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.
Yes, it would avoid duplication, but I'm not sure if the tooling we have for validation will work correctly. I'll try 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.
Actually, I think it's better to not include them in manifest-schema.json
. I'd rather duplicate that for now in the 2 policies that need those definitions than opening them in the schema and having to support them in case someones starts depending on them. At least until the conditional policy is more mature.
t/apicast-policy-rate-limit.t
Outdated
lua_shared_dict limiter 1m; | ||
--- config | ||
include $TEST_NGINX_APICAST_CONFIG; | ||
resolver $TEST_NGINX_RESOLVER; |
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.
No need for resolver.
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.
Right, copy-pasted that before I saw your new PR :D
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.
Fixed 👍
4ded891
to
27312ff
Compare
Closes the last item of the TODO list in #760