From 8d4d52bc2043a4f62aa94b22ac9c39dd08856393 Mon Sep 17 00:00:00 2001 From: Yuchen Dai Date: Mon, 8 Mar 2021 17:07:31 -0800 Subject: [PATCH 1/3] api: add internal listener Signed-off-by: Yuchen Dai --- api/envoy/config/listener/v3/listener.proto | 16 +++++++++++++++- .../config/listener/v4alpha/listener.proto | 18 +++++++++++++++++- .../envoy/config/listener/v3/listener.proto | 16 +++++++++++++++- .../config/listener/v4alpha/listener.proto | 18 +++++++++++++++++- 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/api/envoy/config/listener/v3/listener.proto b/api/envoy/config/listener/v3/listener.proto index 22790566daed5..bcad3fe37edc1 100644 --- a/api/envoy/config/listener/v3/listener.proto +++ b/api/envoy/config/listener/v3/listener.proto @@ -35,7 +35,7 @@ message ListenerCollection { repeated xds.core.v3.CollectionEntry entries = 1; } -// [#next-free-field: 27] +// [#next-free-field: 28] message Listener { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Listener"; @@ -88,6 +88,11 @@ message Listener { } } + // Configuration for envoy internal listener. All the future internal listener features should be added here. + // [#not-implemented-hide:] + message InternalListenerConfig { + } + reserved 14; // The unique name by which this listener is known. If no name is provided, @@ -275,4 +280,13 @@ message Listener { // :ref:`use_original_dst ` // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; + + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` + // is not allowed, and some socket options are not supported. + // Require that :ref:`address ` has field `envoy_internal_address`. + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; } diff --git a/api/envoy/config/listener/v4alpha/listener.proto b/api/envoy/config/listener/v4alpha/listener.proto index ba667b4414dcb..e0945b82e0765 100644 --- a/api/envoy/config/listener/v4alpha/listener.proto +++ b/api/envoy/config/listener/v4alpha/listener.proto @@ -38,7 +38,7 @@ message ListenerCollection { repeated xds.core.v3.CollectionEntry entries = 1; } -// [#next-free-field: 27] +// [#next-free-field: 28] message Listener { option (udpa.annotations.versioning).previous_message_type = "envoy.config.listener.v3.Listener"; @@ -91,6 +91,13 @@ message Listener { } } + // Configuration for envoy internal listener. All the future internal listener features should be added here. + // [#not-implemented-hide:] + message InternalListenerConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.listener.v3.Listener.InternalListenerConfig"; + } + reserved 14, 7; reserved "deprecated_v1"; @@ -277,4 +284,13 @@ message Listener { // :ref:`use_original_dst ` // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; + + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` + // is not allowed, and some socket options are not supported. + // Require that :ref:`address ` has field `envoy_internal_address`. + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; } diff --git a/generated_api_shadow/envoy/config/listener/v3/listener.proto b/generated_api_shadow/envoy/config/listener/v3/listener.proto index 22790566daed5..bcad3fe37edc1 100644 --- a/generated_api_shadow/envoy/config/listener/v3/listener.proto +++ b/generated_api_shadow/envoy/config/listener/v3/listener.proto @@ -35,7 +35,7 @@ message ListenerCollection { repeated xds.core.v3.CollectionEntry entries = 1; } -// [#next-free-field: 27] +// [#next-free-field: 28] message Listener { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Listener"; @@ -88,6 +88,11 @@ message Listener { } } + // Configuration for envoy internal listener. All the future internal listener features should be added here. + // [#not-implemented-hide:] + message InternalListenerConfig { + } + reserved 14; // The unique name by which this listener is known. If no name is provided, @@ -275,4 +280,13 @@ message Listener { // :ref:`use_original_dst ` // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; + + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` + // is not allowed, and some socket options are not supported. + // Require that :ref:`address ` has field `envoy_internal_address`. + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; } diff --git a/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto b/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto index 842029ba333eb..d795e028fd7a6 100644 --- a/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto +++ b/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto @@ -38,7 +38,7 @@ message ListenerCollection { repeated xds.core.v3.CollectionEntry entries = 1; } -// [#next-free-field: 27] +// [#next-free-field: 28] message Listener { option (udpa.annotations.versioning).previous_message_type = "envoy.config.listener.v3.Listener"; @@ -91,6 +91,13 @@ message Listener { } } + // Configuration for envoy internal listener. All the future internal listener features should be added here. + // [#not-implemented-hide:] + message InternalListenerConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.listener.v3.Listener.InternalListenerConfig"; + } + reserved 14; // The unique name by which this listener is known. If no name is provided, @@ -278,4 +285,13 @@ message Listener { // :ref:`use_original_dst ` // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; + + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` + // is not allowed, and some socket options are not supported. + // Require that :ref:`address ` has field `envoy_internal_address`. + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; } From 46cb37020d3767f6a74d15db12f1ad72964d5067 Mon Sep 17 00:00:00 2001 From: Yuchen Dai Date: Mon, 8 Mar 2021 20:53:31 -0800 Subject: [PATCH 2/3] restrictions in unordered list Signed-off-by: Yuchen Dai --- api/envoy/config/listener/v3/listener.proto | 13 ++++++++++--- api/envoy/config/listener/v4alpha/listener.proto | 13 ++++++++++--- .../envoy/config/listener/v3/listener.proto | 13 ++++++++++--- .../envoy/config/listener/v4alpha/listener.proto | 13 ++++++++++--- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/api/envoy/config/listener/v3/listener.proto b/api/envoy/config/listener/v3/listener.proto index bcad3fe37edc1..83b5e061553d0 100644 --- a/api/envoy/config/listener/v3/listener.proto +++ b/api/envoy/config/listener/v3/listener.proto @@ -284,9 +284,16 @@ message Listener { // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the // :ref:`envoy cluster ` to create a user space connection to. // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` - // is not allowed, and some socket options are not supported. - // Require that :ref:`address ` has field `envoy_internal_address`. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` // [#not-implemented-hide:] InternalListenerConfig internal_listener = 27; } diff --git a/api/envoy/config/listener/v4alpha/listener.proto b/api/envoy/config/listener/v4alpha/listener.proto index e0945b82e0765..fe69d51f1d8ca 100644 --- a/api/envoy/config/listener/v4alpha/listener.proto +++ b/api/envoy/config/listener/v4alpha/listener.proto @@ -288,9 +288,16 @@ message Listener { // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the // :ref:`envoy cluster ` to create a user space connection to. // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` - // is not allowed, and some socket options are not supported. - // Require that :ref:`address ` has field `envoy_internal_address`. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` // [#not-implemented-hide:] InternalListenerConfig internal_listener = 27; } diff --git a/generated_api_shadow/envoy/config/listener/v3/listener.proto b/generated_api_shadow/envoy/config/listener/v3/listener.proto index bcad3fe37edc1..83b5e061553d0 100644 --- a/generated_api_shadow/envoy/config/listener/v3/listener.proto +++ b/generated_api_shadow/envoy/config/listener/v3/listener.proto @@ -284,9 +284,16 @@ message Listener { // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the // :ref:`envoy cluster ` to create a user space connection to. // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` - // is not allowed, and some socket options are not supported. - // Require that :ref:`address ` has field `envoy_internal_address`. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` // [#not-implemented-hide:] InternalListenerConfig internal_listener = 27; } diff --git a/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto b/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto index d795e028fd7a6..b0f374c16e225 100644 --- a/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto +++ b/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto @@ -289,9 +289,16 @@ message Listener { // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the // :ref:`envoy cluster ` to create a user space connection to. // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // There are some limitations are derived from the implementation. The known limitations include `connection_balance_config` - // is not allowed, and some socket options are not supported. - // Require that :ref:`address ` has field `envoy_internal_address`. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` // [#not-implemented-hide:] InternalListenerConfig internal_listener = 27; } From 0b2e5ba58ae3d5f9402cb510646b85c2bb2cc7f5 Mon Sep 17 00:00:00 2001 From: Yuchen Dai Date: Tue, 9 Mar 2021 10:50:47 -0800 Subject: [PATCH 3/3] add oneof listener_specifier Signed-off-by: Yuchen Dai --- api/envoy/config/listener/v3/listener.proto | 34 +++++++++++-------- .../config/listener/v4alpha/listener.proto | 34 +++++++++++-------- .../envoy/config/listener/v3/listener.proto | 34 +++++++++++-------- .../config/listener/v4alpha/listener.proto | 34 +++++++++++-------- 4 files changed, 80 insertions(+), 56 deletions(-) diff --git a/api/envoy/config/listener/v3/listener.proto b/api/envoy/config/listener/v3/listener.proto index 83b5e061553d0..7d0085aa8c370 100644 --- a/api/envoy/config/listener/v3/listener.proto +++ b/api/envoy/config/listener/v3/listener.proto @@ -281,19 +281,25 @@ message Listener { // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; - // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the - // :ref:`envoy cluster ` to create a user space connection to. - // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // The internal listener require :ref:`address ` has - // field `envoy_internal_address`. - // - // There are some limitations are derived from the implementation. The known limitations include - // - // * :ref:`ConnectionBalanceConfig ` is not - // allowed because both cluster connection and listener connection must be owned by the same dispatcher. - // * :ref:`tcp_backlog_size ` - // * :ref:`freebind ` - // * :ref:`transparent ` + // The exclusive listener type and the corresponding config. + // TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 + // Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. // [#not-implemented-hide:] - InternalListenerConfig internal_listener = 27; + oneof listener_specifier { + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; + } } diff --git a/api/envoy/config/listener/v4alpha/listener.proto b/api/envoy/config/listener/v4alpha/listener.proto index fe69d51f1d8ca..dd58aa2db18dd 100644 --- a/api/envoy/config/listener/v4alpha/listener.proto +++ b/api/envoy/config/listener/v4alpha/listener.proto @@ -285,19 +285,25 @@ message Listener { // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; - // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the - // :ref:`envoy cluster ` to create a user space connection to. - // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // The internal listener require :ref:`address ` has - // field `envoy_internal_address`. - // - // There are some limitations are derived from the implementation. The known limitations include - // - // * :ref:`ConnectionBalanceConfig ` is not - // allowed because both cluster connection and listener connection must be owned by the same dispatcher. - // * :ref:`tcp_backlog_size ` - // * :ref:`freebind ` - // * :ref:`transparent ` + // The exclusive listener type and the corresponding config. + // TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 + // Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. // [#not-implemented-hide:] - InternalListenerConfig internal_listener = 27; + oneof listener_specifier { + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; + } } diff --git a/generated_api_shadow/envoy/config/listener/v3/listener.proto b/generated_api_shadow/envoy/config/listener/v3/listener.proto index 83b5e061553d0..7d0085aa8c370 100644 --- a/generated_api_shadow/envoy/config/listener/v3/listener.proto +++ b/generated_api_shadow/envoy/config/listener/v3/listener.proto @@ -281,19 +281,25 @@ message Listener { // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; - // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the - // :ref:`envoy cluster ` to create a user space connection to. - // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // The internal listener require :ref:`address ` has - // field `envoy_internal_address`. - // - // There are some limitations are derived from the implementation. The known limitations include - // - // * :ref:`ConnectionBalanceConfig ` is not - // allowed because both cluster connection and listener connection must be owned by the same dispatcher. - // * :ref:`tcp_backlog_size ` - // * :ref:`freebind ` - // * :ref:`transparent ` + // The exclusive listener type and the corresponding config. + // TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 + // Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. // [#not-implemented-hide:] - InternalListenerConfig internal_listener = 27; + oneof listener_specifier { + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; + } } diff --git a/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto b/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto index b0f374c16e225..b6d54f557ed2a 100644 --- a/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto +++ b/generated_api_shadow/envoy/config/listener/v4alpha/listener.proto @@ -286,19 +286,25 @@ message Listener { // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; - // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the - // :ref:`envoy cluster ` to create a user space connection to. - // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - // The internal listener require :ref:`address ` has - // field `envoy_internal_address`. - // - // There are some limitations are derived from the implementation. The known limitations include - // - // * :ref:`ConnectionBalanceConfig ` is not - // allowed because both cluster connection and listener connection must be owned by the same dispatcher. - // * :ref:`tcp_backlog_size ` - // * :ref:`freebind ` - // * :ref:`transparent ` + // The exclusive listener type and the corresponding config. + // TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 + // Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. // [#not-implemented-hide:] - InternalListenerConfig internal_listener = 27; + oneof listener_specifier { + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; + } }