api: add socket_options for multiple addresses (#23415)

Since the ipv4 and ipv6 have different socket option flags, when using multiple addresses, the user has to specify different socket options for the ipv4 address and the ipv6 address.

For the listener, the additional address can be the Ipv6 address, then it should be able to set an Ipv6 flag corresponding to the ipv4 one. Add socket_option field for each additional address.

For the upstream, the endpoint can be ipv4 or ipv6, currently, the user can specify the ipv4 and ipv6 local bind address in the bind config, but there is only a global socket_options that apply to both the ipv4 and ipv6 addresses. Add socket_options for each extra source address. https://envoyproxy.slack.com/archives/C78HA81DH/p1664228598624269

Risk Level: low
Testing: n/a
Docs Changes: API doc
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: He Jie Xu <hejie.xu@intel.com>

Mirrored from https://github.com/envoyproxy/envoy @ 601cf012144a6d212879b315efa51e9cdf177878
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent 8dfc730258
commit 0c85a1958d
  1. 10
      envoy/config/core/v3/address.proto
  2. 5
      envoy/config/core/v3/socket_option.proto
  3. 10
      envoy/config/listener/v3/listener.proto

@ -119,6 +119,16 @@ message TcpKeepalive {
message ExtraSourceAddress {
// The additional address to bind.
SocketAddress address = 1 [(validate.rules).message = {required: true}];
// [#not-implemented-hide:]
// Additional socket options that may not be present in Envoy source code or
// precompiled binaries. If specified, this will override the
// :ref:`socket_options <envoy_v3_api_field_config.core.v3.BindConfig.socket_options>`
// in the BindConfig. If specified with no
// :ref:`socket_options <envoy_v3_api_field_config.core.v3.SocketOptionsOverride.socket_options>`
// or an empty list of :ref:`socket_options <envoy_v3_api_field_config.core.v3.SocketOptionsOverride.socket_options>`,
// it means no socket option will apply.
SocketOptionsOverride socket_options = 2;
}
// [#next-free-field: 6]

@ -75,3 +75,8 @@ message SocketOption {
// STATE_PREBIND is currently the only valid value.
SocketState state = 6 [(validate.rules).enum = {defined_only: true}];
}
// [#not-implemented-hide:]
message SocketOptionsOverride {
repeated SocketOption socket_options = 1;
}

@ -36,6 +36,16 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// The additional address the listener is listening on.
message AdditionalAddress {
core.v3.Address address = 1;
// [#not-implemented-hide:]
// Additional socket options that may not be present in Envoy source code or
// precompiled binaries. If specified, this will override the
// :ref:`socket_options <envoy_v3_api_field_config.listener.v3.Listener.socket_options>`
// in the listener. If specified with no
// :ref:`socket_options <envoy_v3_api_field_config.core.v3.SocketOptionsOverride.socket_options>`
// or an empty list of :ref:`socket_options <envoy_v3_api_field_config.core.v3.SocketOptionsOverride.socket_options>`,
// it means no socket option will apply.
core.v3.SocketOptionsOverride socket_options = 2;
}
// Listener list collections. Entries are ``Listener`` resources or references.

Loading…
Cancel
Save