-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Clearly document whether filter names matter #21759
Comments
cc @kyessenov @shashankram my understanding is that this is kinda slowly transitioning and the docs probably need to catch up i would be happy to follow up or review PRs - i think the issue you raise is important |
Yes, we need to make a thorough pass to remove the clauses saying "this filter should be configured with name XXX". I want to get #21707 first since it's really important to also say what type URL to use, and that was the reason. |
That's a super useful change, as I have also been wondering if there is a doc for the exact same purpose. |
@phlax @kyessenov so starting v1.22, is it safe to assume filter names are irrelevant? And is this the case for all filters or just extensions? |
@shashankram The fallback to use type_url was there for a very long time. The only concern is when they are not matching, in which case, v1.22 will use type_url instead of name (and ignore name) as the primary lookup. |
This works for all typed extensions which is almost everything in Envoy except few exceptions (mostly internal to Envoy and not user facing). |
What about types that are not under the extensions category? Do the filters corresponding to the names defined in https://github.com/envoyproxy/go-control-plane/blob/main/pkg/wellknown/wellknown.go need to use a well defined name? Please document for every filter, regardless of whether is an extension or not, if it needs to be defined with a specific name. |
Every filter is an extension, and every extension that has a protobuf type is uniquely identified by that protobuf type. The name can be anything as long as you use protobuf type for |
That makes sense, thanks. |
@kyessenov, also in the Envoy config dump I see references to wellknown names in the
Do the names here not matter or are these fallback names? |
@kyessenov @phlax, I tried an experiment where I changed the HTTP RBACPerRoute filter name from I started seeing XDS error logs:
When I changed the filter name back to the wellnown name
So it seems like a wellknown name is still required for certain filters? |
@phlax @kyessenov could you comment whether the RBACPerRoute filter needs to be configured with the filter name |
- Updates Envoy to its latest available version (v1.22.2 for Linux, v1.22.1 for Windows). The latest version includes the latest released security fix. We could not update Envoy previously due to a blocking bug: envoyproxy/envoy#20113 - Updates filter names to custom names as wellknown names are deprecated in Envoy (with 1 exception for the http.rbac filter). Envoy will use the TypeURL in the proto to determine which filter to use instead. Wellknown names are not required and using them is confusing because not all filters are defined in the legacy wellknown pkg (e.g. http.local_ratelimit). See: envoyproxy/envoy#21759 envoyproxy/envoy#21763 envoyproxy/go-control-plane#293 envoyproxy/go-control-plane#552 - Uses the distroless image as the alpine image has been discontinued: envoyproxy/envoy#21758 - Updates tests to use custom filter names - Adds `proto_types.go` to aid dynamic proto resolution for typed configs using `any.Any()`. This helps resolve protos where dynamic resolution is necessary. - Updated Prometheus' ConfigMap to reflect changes to Envoy metrics prefixes Signed-off-by: Shashank Ram <shashr2204@gmail.com>
- Updates Envoy to its latest available version (v1.22.2 for Linux, v1.22.1 for Windows). The latest version includes the latest released security fix. We could not update Envoy previously due to a blocking bug: envoyproxy/envoy#20113 - Updates filter names to custom names as wellknown names are deprecated in Envoy (with 1 exception for the http.rbac filter). Envoy will use the TypeURL in the proto to determine which filter to use instead. Wellknown names are not required and using them is confusing because not all filters are defined in the legacy wellknown pkg (e.g. http.local_ratelimit). See: envoyproxy/envoy#21759 envoyproxy/envoy#21763 envoyproxy/go-control-plane#293 envoyproxy/go-control-plane#552 - Uses the distroless image as the alpine image has been discontinued: envoyproxy/envoy#21758 - Updates tests to use custom filter names - Adds `proto_types.go` to aid dynamic proto resolution for typed configs using `any.Any()`. This helps resolve protos where dynamic resolution is necessary. - Updated Prometheus' ConfigMap to reflect changes to Envoy metrics prefixes Signed-off-by: Shashank Ram <shashr2204@gmail.com>
@shashankram Yes, you are right that we use qualified names for per_filter_config at the moment. That's changing per #12274, but it'll take an effort to transition. |
@shashankram Actually, your comment is about something else. Per route config is meant to be placed in |
@kyessenov this clarifies my concern. I am referring to the I am unsure what you mean in #21759 (comment), but I was conveying that the filter name specified in the typed_per_filter_config for HTTP filters must use a qualified name, while also reference the same qualified name in the |
Signed-off-by: Kuat Yessenov kuat@google.com Commit Message: make a pass to remove stale suggestion to use filter names. Risk Level: low Testing: none Docs Changes: yes Release Notes: none Issue: Fix #21759
It seems like Envoy does not care about the filter name, but uses the TypeUrl in the config to determine which filter to use.
Relevant commit:
Also discussions in the following issues seem to indicate the same:
envoyproxy/go-control-plane#552
envoyproxy/go-control-plane#293
However, there still exists confusion based on the wording in the docs.
For e.g., the Envoy doc suggests to use the filter name for the OriginalDestination ListenerFilter:
This filter should be configured with the name envoy.filters.listener.original_dst.
This contradicts statements about the filter name not being relevant.
Kindly clarify in the docs whether filter names are relevant or not.
The text was updated successfully, but these errors were encountered: