Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/envoy/api/v2/core/address.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package envoy.api.v2.core;

import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/socket_option.proto";

import "google/protobuf/wrappers.proto";

Expand Down
51 changes: 10 additions & 41 deletions api/envoy/api/v2/core/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package envoy.api.v2.core;

import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/backoff.proto";
import "envoy/api/v2/core/http_uri.proto";
import "envoy/type/percent.proto";
Expand All @@ -15,6 +16,8 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";

import public "envoy/api/v2/core/socket_option.proto";

option java_package = "io.envoyproxy.envoy.api.v2.core";
option java_outer_classname = "BaseProto";
option java_multiple_files = true;
Expand Down Expand Up @@ -123,7 +126,7 @@ message Extension {
// Identifies a specific Envoy instance. The node identifier is presented to the
// management server, which may use this identifier to distinguish per Envoy
// configuration for serving.
// [#next-free-field: 11]
// [#next-free-field: 12]
message Node {
// An opaque node identifier for the Envoy node. This also provides the local
// service node name. It should be set if any of the following features are
Expand Down Expand Up @@ -182,6 +185,12 @@ message Node {
// See :ref:`the list of features <client_features>` that xDS client may
// support.
repeated string client_features = 10;

// Known listening ports on the node as a generic hint to the management server
// for filtering :ref:`listeners <config_listeners>` to be returned. For example,
// if there is a listener bound to port 80, the list can optionally contain the
// SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint.
repeated Address listening_addresses = 11;
Comment thread
lizan marked this conversation as resolved.
}

// Metadata provides additional inputs to filters based on matched listeners,
Expand Down Expand Up @@ -335,46 +344,6 @@ message TransportSocket {
}
}

// Generic socket option message. This would be used to set socket options that
// might not exist in upstream kernels or precompiled Envoy binaries.
// [#next-free-field: 7]
message SocketOption {
enum SocketState {
// Socket options are applied after socket creation but before binding the socket to a port
STATE_PREBIND = 0;

// Socket options are applied after binding the socket to a port but before calling listen()
STATE_BOUND = 1;

// Socket options are applied after calling listen()
STATE_LISTENING = 2;
}

// An optional name to give this socket option for debugging, etc.
// Uniqueness is not required and no special meaning is assumed.
string description = 1;

// Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
int64 level = 2;

// The numeric name as passed to setsockopt
int64 name = 3;

oneof value {
option (validate.required) = true;

// Because many sockopts take an int value.
int64 int_value = 4;

// Otherwise it's a byte buffer.
bytes buf_value = 5;
}

// The state in which the option will be applied. When used in BindConfig
// STATE_PREBIND is currently the only valid value.
SocketState state = 6 [(validate.rules).enum = {defined_only: true}];
}

// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not
// specified via a runtime key.
//
Expand Down
53 changes: 53 additions & 0 deletions api/envoy/api/v2/core/socket_option.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
syntax = "proto3";

package envoy.api.v2.core;

import "udpa/annotations/migrate.proto";
import "validate/validate.proto";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to add option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; (as done in other files in this package) for the correct file movement in v3.
`


option java_package = "io.envoyproxy.envoy.api.v2.core";
option java_outer_classname = "SocketOptionProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3";

// [#protodoc-title: Socket Option ]

// Generic socket option message. This would be used to set socket options that
// might not exist in upstream kernels or precompiled Envoy binaries.
// [#next-free-field: 7]
message SocketOption {
enum SocketState {
// Socket options are applied after socket creation but before binding the socket to a port
STATE_PREBIND = 0;

// Socket options are applied after binding the socket to a port but before calling listen()
STATE_BOUND = 1;

// Socket options are applied after calling listen()
STATE_LISTENING = 2;
}

// An optional name to give this socket option for debugging, etc.
// Uniqueness is not required and no special meaning is assumed.
string description = 1;

// Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
int64 level = 2;

// The numeric name as passed to setsockopt
int64 name = 3;

oneof value {
option (validate.required) = true;

// Because many sockopts take an int value.
int64 int_value = 4;

// Otherwise it's a byte buffer.
bytes buf_value = 5;
}

// The state in which the option will be applied. When used in BindConfig
// STATE_PREBIND is currently the only valid value.
SocketState state = 6 [(validate.rules).enum = {defined_only: true}];
}
1 change: 1 addition & 0 deletions api/envoy/api/v2/listener.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package envoy.api.v2;

import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/socket_option.proto";
import "envoy/api/v2/listener/listener_components.proto";
import "envoy/api/v2/listener/udp_listener_config.proto";
import "envoy/config/listener/v2/api_listener.proto";
Expand Down
1 change: 1 addition & 0 deletions api/envoy/config/bootstrap/v2/bootstrap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "envoy/api/v2/cluster.proto";
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/core/socket_option.proto";
import "envoy/api/v2/listener.proto";
import "envoy/config/metrics/v2/stats.proto";
import "envoy/config/overload/v2alpha/overload.proto";
Expand Down
1 change: 1 addition & 0 deletions api/envoy/config/bootstrap/v3/bootstrap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "envoy/config/cluster/v3/cluster.proto";
import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/socket_option.proto";
import "envoy/config/listener/v3/listener.proto";
import "envoy/config/metrics/v3/stats.proto";
import "envoy/config/overload/v3/overload.proto";
Expand Down
2 changes: 1 addition & 1 deletion api/envoy/config/core/v3/address.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package envoy.config.core.v3;

import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/socket_option.proto";

import "google/protobuf/wrappers.proto";

Expand Down
51 changes: 8 additions & 43 deletions api/envoy/config/core/v3/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package envoy.config.core.v3;

import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/backoff.proto";
import "envoy/config/core/v3/http_uri.proto";
import "envoy/type/v3/percent.proto";
Expand Down Expand Up @@ -129,7 +130,7 @@ message Extension {
// Identifies a specific Envoy instance. The node identifier is presented to the
// management server, which may use this identifier to distinguish per Envoy
// configuration for serving.
// [#next-free-field: 11]
// [#next-free-field: 12]
message Node {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Node";

Expand Down Expand Up @@ -188,6 +189,12 @@ message Node {
// See :ref:`the list of features <client_features>` that xDS client may
// support.
repeated string client_features = 10;

// Known listening ports on the node as a generic hint to the management server
// for filtering :ref:`listeners <config_listeners>` to be returned. For example,
// if there is a listener bound to port 80, the list can optionally contain the
// SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint.
repeated Address listening_addresses = 11;
}

// Metadata provides additional inputs to filters based on matched listeners,
Expand Down Expand Up @@ -367,48 +374,6 @@ message TransportSocket {
}
}

// Generic socket option message. This would be used to set socket options that
// might not exist in upstream kernels or precompiled Envoy binaries.
// [#next-free-field: 7]
message SocketOption {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SocketOption";

enum SocketState {
// Socket options are applied after socket creation but before binding the socket to a port
STATE_PREBIND = 0;

// Socket options are applied after binding the socket to a port but before calling listen()
STATE_BOUND = 1;

// Socket options are applied after calling listen()
STATE_LISTENING = 2;
}

// An optional name to give this socket option for debugging, etc.
// Uniqueness is not required and no special meaning is assumed.
string description = 1;

// Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
int64 level = 2;

// The numeric name as passed to setsockopt
int64 name = 3;

oneof value {
option (validate.required) = true;

// Because many sockopts take an int value.
int64 int_value = 4;

// Otherwise it's a byte buffer.
bytes buf_value = 5;
}

// The state in which the option will be applied. When used in BindConfig
// STATE_PREBIND is currently the only valid value.
SocketState state = 6 [(validate.rules).enum = {defined_only: true}];
}

// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not
// specified via a runtime key.
//
Expand Down
55 changes: 55 additions & 0 deletions api/envoy/config/core/v3/socket_option.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
syntax = "proto3";

package envoy.config.core.v3;

import "udpa/annotations/versioning.proto";

import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.config.core.v3";
option java_outer_classname = "SocketOptionProto";
option java_multiple_files = true;

// [#protodoc-title: Socket Option ]

// Generic socket option message. This would be used to set socket options that
// might not exist in upstream kernels or precompiled Envoy binaries.
// [#next-free-field: 7]
message SocketOption {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SocketOption";

enum SocketState {
// Socket options are applied after socket creation but before binding the socket to a port
STATE_PREBIND = 0;

// Socket options are applied after binding the socket to a port but before calling listen()
STATE_BOUND = 1;

// Socket options are applied after calling listen()
STATE_LISTENING = 2;
}

// An optional name to give this socket option for debugging, etc.
// Uniqueness is not required and no special meaning is assumed.
string description = 1;

// Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
int64 level = 2;

// The numeric name as passed to setsockopt
int64 name = 3;

oneof value {
option (validate.required) = true;

// Because many sockopts take an int value.
int64 int_value = 4;

// Otherwise it's a byte buffer.
bytes buf_value = 5;
}

// The state in which the option will be applied. When used in BindConfig
// STATE_PREBIND is currently the only valid value.
SocketState state = 6 [(validate.rules).enum = {defined_only: true}];
}
1 change: 1 addition & 0 deletions api/envoy/config/listener/v3/listener.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package envoy.config.listener.v3;

import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/socket_option.proto";
import "envoy/config/listener/v3/api_listener.proto";
import "envoy/config/listener/v3/listener_components.proto";
import "envoy/config/listener/v3/udp_listener_config.proto";
Expand Down
1 change: 1 addition & 0 deletions docs/root/api-v2/common_messages/common_messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ Common messages
../api/v2/core/config_source.proto
../api/v2/core/grpc_service.proto
../api/v2/core/http_uri.proto
../api/v2/core/socket_option.proto
../api/v2/auth/cert.proto
../api/v2/ratelimit/ratelimit.proto
2 changes: 1 addition & 1 deletion generated_api_shadow/envoy/api/v2/core/address.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading