Skip to content

api: new field to the FilterConfig to disable a filter in specific route or vh #25927

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

Merged
merged 4 commits into from
Mar 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions api/envoy/config/route/v3/route_components.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2384,4 +2384,18 @@ message FilterConfig {
// not support the specified filter, it may ignore the map entry rather
// than rejecting the config.
bool is_optional = 2;

// If true, the filter is disabled in the route or virtual host and the ``config`` field is ignored.
//
// .. note::
//
// This field will take effect when the request arrive and filter chain is created for the request.
// If initial route is selected for the request and a filter is disabled in the initial route, then
// the filter will not be added to the filter chain.
// And if the request is mutated later and re-match to another route, the disabled filter by the
// initial route will not be added back to the filter chain because the filter chain is already
// created and it is too late to change the chain.
//
// This field only make sense for the downstream HTTP filters for now.
Copy link
Member

@htuch htuch Mar 14, 2023

Choose a reason for hiding this comment

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

Should add a not-implemented-yet annotation or merge this into the implementation PR. Otherwise LGTM, thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

The FilterConfig message are annotated as not-implemented. So, it's unnecessary to add the annotation seperatedly for this field.

bool disabled = 3;
}