listeners: add unified matcher for filter chains (#20110)

Add unified matcher for network streams, as a replacement for filter chain match.

See previous discussion in #18871

Signed-off-by: Kuat Yessenov <kuat@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 7eb3a87b8757e030aedfdc4959adc509e89ac788
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 569110ab41
commit 63ae261978
  1. 2
      envoy/config/listener/v3/BUILD
  2. 23
      envoy/config/listener/v3/listener.proto
  3. 11
      envoy/config/listener/v3/listener_components.proto

@ -11,6 +11,8 @@ api_proto_package(
"//envoy/config/core/v3:pkg",
"//envoy/type/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
"@com_github_cncf_udpa//xds/annotations/v3:pkg",
"@com_github_cncf_udpa//xds/core/v3:pkg",
"@com_github_cncf_udpa//xds/type/matcher/v3:pkg",
],
)

@ -13,7 +13,9 @@ import "envoy/config/listener/v3/udp_listener_config.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "xds/annotations/v3/status.proto";
import "xds/core/v3/collection_entry.proto";
import "xds/type/matcher/v3/matcher.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/security.proto";
@ -36,7 +38,7 @@ message ListenerCollection {
repeated xds.core.v3.CollectionEntry entries = 1;
}
// [#next-free-field: 32]
// [#next-free-field: 33]
message Listener {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Listener";
@ -120,6 +122,25 @@ message Listener {
// :ref:`FAQ entry <faq_how_to_setup_sni>`.
repeated FilterChain filter_chains = 3;
// :ref:`Matcher API <arch_overview_matching_listener>` resolving the filter chain name from the
// network properties. This matcher is used as a replacement for the filter chain match condition
// :ref:`filter_chain_match
// <envoy_v3_api_field_config.listener.v3.FilterChain.filter_chain_match>`. If specified, all
// :ref:`filter_chains <envoy_v3_api_field_config.listener.v3.Listener.filter_chains>` must have a
// non-empty and unique :ref:`name <envoy_v3_api_field_config.listener.v3.FilterChain.name>` field
// and not specify :ref:`filter_chain_match
// <envoy_v3_api_field_config.listener.v3.FilterChain.filter_chain_match>` field.
//
// .. note::
//
// Once matched, each connection is permanently bound to its filter chain.
// If the matcher changes but the filter chain remains the same, the
// connections bound to the filter chain are not drained. If, however, the
// filter chain is removed or structurally modified, then the drain for its
// connections is initiated.
xds.type.matcher.v3.Matcher filter_chain_matcher = 32
[(xds.annotations.v3.field_status).work_in_progress = true];
// If a connection is redirected using *iptables*, the port on which the proxy
// receives it might be different from the original destination address. When this flag is set to
// true, the listener hands off redirected connections to the listener associated with the

@ -11,6 +11,8 @@ import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "xds/annotations/v3/status.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
@ -258,10 +260,11 @@ message FilterChain {
// establishment, the connection is summarily closed.
google.protobuf.Duration transport_socket_connect_timeout = 9;
// [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no
// name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter
// chain is to be dynamically updated or removed via FCDS a unique name must be provided.
string name = 7;
// The unique name (or empty) by which this filter chain is known.
// Note: :ref:`filter_chain_matcher
// <envoy_v3_api_field_config.listener.v3.Listener.filter_chain_matcher>`
// requires that filter chains are uniquely named within a listener.
string name = 7 [(xds.annotations.v3.field_status).work_in_progress = true];
// [#not-implemented-hide:] The configuration to specify whether the filter chain will be built on-demand.
// If this field is not empty, the filter chain will be built on-demand.

Loading…
Cancel
Save