envoy icon indicating copy to clipboard operation
envoy copied to clipboard

envoy-1.23 issue ExtProcPerRoute override ExtProc with ExtensionWithMatcher

Open pgeler opened this issue 3 years ago • 3 comments

Description:

The following configuration was working in 1.22 while 1.23 seem to have issues: without ExtensionWithMatcher ExtProcPerRoute working just fine.

main plugin configuration:

          - name: composite
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.common.matching.v3.ExtensionWithMatcher
              extension_config:
                name: envoy.filters.http.ext_proc
                typed_config:
                  "@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor
                  failure_mode_allow: false
                  processing_mode:
                    request_header_mode: "SKIP"
                    response_header_mode: "SKIP"
                    request_body_mode: "NONE"
                    response_body_mode: "NONE"
                    request_trailer_mode: "SKIP"
                    response_trailer_mode: "SKIP"
                  grpc_service:
                    envoy_grpc:
                      cluster_name: cluster
              xds_matcher:
                matcher_tree:
                  input:
                    name: response-header
                    typed_config:
                      "@type": type.googleapis.com/envoy.type.matcher.v3.HttpResponseHeaderMatchInput
                      header_name: :status
                  exact_match_map:
                    map:
                      200:
                        action:
                          name: skip
                          typed_config:
                            "@type": type.googleapis.com/envoy.extensions.filters.common.matcher.action.v3.SkipFilter

with ExtProcPerRoute route override:

                typed_per_filter_config:
                  envoy.filters.http.ext_proc:
                    "@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRoute
                    overrides:
                      processing_mode:
                        request_header_mode: "SEND"
                        response_header_mode: "SEND"
                        request_body_mode: "NONE"
                        response_body_mode: "NONE"
                        request_trailer_mode: "SKIP"
                        response_trailer_mode: "SKIP"

pgeler avatar Jul 27 '22 01:07 pgeler

pls let me know if additional details are necessary

pgeler avatar Aug 09 '22 16:08 pgeler

cc @pradeepcrao @snowp

phlax avatar Aug 09 '22 16:08 phlax

I would like to know what issue do you met? A configuration error on start up, or an incorrect behavior during runtime?

zhxie avatar Aug 11 '22 05:08 zhxie

override is not working, at runtime, in this case overrides saying send header data (request_header_mode: "SEND" response_header_mode: "SEND") while main plugin configuration asking to SKIP sending request and response headers

pgeler avatar Aug 12 '22 01:08 pgeler

I suspect it works as expected. The typed_per_filter_config override is applied to envoy.filters.http.ext_proc, while the HTTP filter chain has a composite only. I guess composite filter does not support to passthrough typed_per_filter_config to its insides.

zhxie avatar Aug 12 '22 02:08 zhxie

I suspect it works as expected. The typed_per_filter_config override is applied to envoy.filters.http.ext_proc, while the HTTP filter chain has a composite only. I guess composite filter does not support to passthrough typed_per_filter_config to its insides.

@zhxie as I mentioned it was working just fine in 1.22 and before that, so this behavior was introduced after 1.23

pgeler avatar Aug 18 '22 15:08 pgeler