Skip to content
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

Merged
merged 5 commits into from
Aug 20, 2018
Merged

Add conditions to rate-limit policy #839

merged 5 commits into from
Aug 20, 2018

Conversation

davidor
Copy link
Contributor

@davidor davidor commented Aug 10, 2018

Closes the last item of the TODO list in #760

@davidor davidor requested a review from a team as a code owner August 10, 2018 10:00
},
"operation": {
"type": "object",
"$id": "#/definitions/operation",
Copy link
Contributor

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?

Copy link
Contributor Author

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 ?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

lua_shared_dict limiter 1m;
--- config
include $TEST_NGINX_APICAST_CONFIG;
resolver $TEST_NGINX_RESOLVER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for resolver.

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 👍

@davidor davidor merged commit ca217d7 into master Aug 20, 2018
@davidor davidor deleted the rate-limit-conditions branch August 20, 2018 14:02
@mikz mikz mentioned this pull request Aug 20, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants