-
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
[config] add support to filter services by endpoint. #1022
Conversation
doc/parameters.md
Outdated
### `APICAST_SERVICES_FILTER` | ||
**Value:** a regegular expression | ||
**Default:**: .* | ||
**Example:** *.example.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.
Will it be possible to supply multiple patterns? I totally could see that there will be two wildcards in some cases.
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.
Hm. Based on the code it looks like this should be a regex, but from the example, it looks like a wildcard.
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.
should be clear now ;-)
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.
*.example.com
is not valid PCRE no?
16e837e
to
c06bb02
Compare
c06bb02
to
875a7d6
Compare
875a7d6
to
2b42352
Compare
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.
Some minor changes to apply.
|
||
it("combination with service list", function() | ||
env.set('APICAST_SERVICES_FILTER_BY_URL', '^test.*') | ||
assert.same(filter_services(mockservices, {"21"}), { |
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.
Would this test be clearer if the 2 variables were set at the beginning and we had a single assert?
Migrated t/apicast-subset-of-services.t tests to the new testing Blackbox schema Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
c1a6267
to
01f8778
Compare
01f8778
to
1b85f11
Compare
e8b95b3
to
a3b9fdd
Compare
**Default:**: .* | ||
**Example:** *.example.com | ||
|
||
Used to filter the service configured in the 3scale API Manager, the filter |
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.
We probably should mention the filter is PCRE.
a3b9fdd
to
6a1e44b
Compare
This commit adds the option to filter services based on the endpoint. This commit expose a new config flag using the env variable `APICAST_SERVICES_FILTER_BY_URL`, services filter happens on `configuration.filter_services`. Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
This test validates that the parameter `APICAST_SERVICE_FILTER_BY_URL` is working correctly across multiple services and the service discarding is working correctly. Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
6a1e44b
to
6c7702b
Compare
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.
Good job!
|
This commit adds the option to filter services based on the endpoint.
This commit expose a new config flag using the env variable
APICAST_SERVICES_FILTER
, services filter happens onconfiguration.filter_services
.Signed-off-by: Eloy Coto eloy.coto@gmail.com