Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: sync envoy proto to commit 62ca8bd2b5960ed1c6ce2be97d3120cee719ecab #8346

Merged
merged 2 commits into from Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions xds/src/test/java/io/grpc/xds/ClientXdsClientDataTest.java
Expand Up @@ -1071,10 +1071,8 @@ public void parseOverrideFilterConfigs_unsupportedAndRequired() {
@Test
public void parseHttpConnectionManager_xffNumTrustedHopsUnsupported()
throws ResourceInvalidException {
HttpConnectionManager hcm =
HttpConnectionManager.newBuilder()
.setXffNumTrustedHops(2)
.build();
@SuppressWarnings("deprecation")
HttpConnectionManager hcm = HttpConnectionManager.newBuilder().setXffNumTrustedHops(2).build();
thrown.expect(ResourceInvalidException.class);
thrown.expectMessage("HttpConnectionManager with xff_num_trusted_hops unsupported");
ClientXdsClient.parseHttpConnectionManager(
Expand Down
12 changes: 9 additions & 3 deletions xds/src/test/java/io/grpc/xds/CsdsServiceTest.java
Expand Up @@ -728,7 +728,9 @@ Map<String, ResourceMetadata> getSubscribedResourcesMetadata(ResourceType type)

// Minimal verification to confirm that the data/metadata XdsClient provides,
// is propagated to the correct resource types.
assertThat(clientConfig.getXdsConfigCount()).isEqualTo(4);
@SuppressWarnings("deprecation")
int xdsConfigCount = clientConfig.getXdsConfigCount();
assertThat(xdsConfigCount).isEqualTo(4);
EnumMap<ResourceType, PerXdsConfig> configDumps = mapConfigDumps(clientConfig);
assertThat(configDumps.keySet()).containsExactly(LDS, RDS, CDS, EDS);

Expand Down Expand Up @@ -803,7 +805,9 @@ private void verifyErrorState(UpdateFailureState errorState) {
*/
private static void verifyClientConfigNoResources(ClientConfig clientConfig) {
// Expect PerXdsConfig for all resource types to be present, but empty.
assertThat(clientConfig.getXdsConfigCount()).isEqualTo(4);
@SuppressWarnings("deprecation")
int xdsConfigCount = clientConfig.getXdsConfigCount();
assertThat(xdsConfigCount).isEqualTo(4);
EnumMap<ResourceType, PerXdsConfig> configDumps = mapConfigDumps(clientConfig);
assertThat(configDumps.keySet()).containsExactly(LDS, RDS, CDS, EDS);

Expand Down Expand Up @@ -842,7 +846,9 @@ private static void verifyPerXdsConfigEmptyFields(PerXdsConfig perXdsConfig) {

private static EnumMap<ResourceType, PerXdsConfig> mapConfigDumps(ClientConfig config) {
EnumMap<ResourceType, PerXdsConfig> xdsConfigMap = new EnumMap<>(ResourceType.class);
for (PerXdsConfig perXdsConfig : config.getXdsConfigList()) {
@SuppressWarnings("deprecation")
List<PerXdsConfig> xdsConfigList = config.getXdsConfigList();
for (PerXdsConfig perXdsConfig : xdsConfigList) {
ResourceType type = perXdsConfigToResourceType(perXdsConfig);
assertThat(type).isNotEqualTo(ResourceType.UNKNOWN);
assertThat(xdsConfigMap).doesNotContainKey(type);
Expand Down
2 changes: 1 addition & 1 deletion xds/third_party/envoy/LICENSE
Expand Up @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
3 changes: 2 additions & 1 deletion xds/third_party/envoy/import.sh
Expand Up @@ -18,7 +18,7 @@
set -e
BRANCH=main
# import VERSION from one of the google internal CLs
VERSION=8b9b87702885beb324dadb349cbcb06d037c956e
VERSION=62ca8bd2b5960ed1c6ce2be97d3120cee719ecab
GIT_REPO="https://github.com/envoyproxy/envoy.git"
GIT_BASE_DIR=envoy
SOURCE_PROTO_BASE_DIR=envoy/api
Expand Down Expand Up @@ -82,6 +82,7 @@ envoy/config/core/v3/health_check.proto
envoy/config/core/v3/http_uri.proto
envoy/config/core/v3/protocol.proto
envoy/config/core/v3/proxy_protocol.proto
envoy/config/core/v3/resolver.proto
envoy/config/core/v3/socket_option.proto
envoy/config/core/v3/substitution_format_string.proto
envoy/config/core/v3/udp_socket_config.proto
Expand Down
Expand Up @@ -53,11 +53,13 @@ message ConfigDump {
// The following configurations are currently supported and will be dumped in the order given
// below:
//
// * *bootstrap*: :ref:`BootstrapConfigDump <envoy_api_msg_admin.v3.BootstrapConfigDump>`
// * *clusters*: :ref:`ClustersConfigDump <envoy_api_msg_admin.v3.ClustersConfigDump>`
// * *endpoints*: :ref:`EndpointsConfigDump <envoy_api_msg_admin.v3.EndpointsConfigDump>`
// * *listeners*: :ref:`ListenersConfigDump <envoy_api_msg_admin.v3.ListenersConfigDump>`
// * *routes*: :ref:`RoutesConfigDump <envoy_api_msg_admin.v3.RoutesConfigDump>`
// * *bootstrap*: :ref:`BootstrapConfigDump <envoy_v3_api_msg_admin.v3.BootstrapConfigDump>`
// * *clusters*: :ref:`ClustersConfigDump <envoy_v3_api_msg_admin.v3.ClustersConfigDump>`
// * *endpoints*: :ref:`EndpointsConfigDump <envoy_v3_api_msg_admin.v3.EndpointsConfigDump>`
// * *listeners*: :ref:`ListenersConfigDump <envoy_v3_api_msg_admin.v3.ListenersConfigDump>`
// * *scoped_routes*: :ref:`ScopedRoutesConfigDump <envoy_v3_api_msg_admin.v3.ScopedRoutesConfigDump>`
// * *routes*: :ref:`RoutesConfigDump <envoy_v3_api_msg_admin.v3.RoutesConfigDump>`
// * *secrets*: :ref:`SecretsConfigDump <envoy_v3_api_msg_admin.v3.SecretsConfigDump>`
//
// EDS Configuration will only be dumped by using parameter `?include_eds`
//
Expand Down Expand Up @@ -126,7 +128,7 @@ message ListenersConfigDump {
"envoy.admin.v2alpha.ListenersConfigDump.DynamicListenerState";

// This is the per-resource version information. This version is currently taken from the
// :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
// :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
// that the listener was loaded. In the future, discrete per-listener versions may be supported
// by the API.
string version_info = 1;
Expand Down Expand Up @@ -174,7 +176,7 @@ message ListenersConfigDump {
ClientResourceStatus client_status = 6;
}

// This is the :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
// This is the :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
// last processed LDS discovery response. If there are only static bootstrap listeners, this field
// will be "".
string version_info = 1;
Expand Down Expand Up @@ -212,7 +214,7 @@ message ClustersConfigDump {
"envoy.admin.v2alpha.ClustersConfigDump.DynamicCluster";

// This is the per-resource version information. This version is currently taken from the
// :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
// :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
// that the cluster was loaded. In the future, discrete per-cluster versions may be supported by
// the API.
string version_info = 1;
Expand All @@ -235,7 +237,7 @@ message ClustersConfigDump {
ClientResourceStatus client_status = 5;
}

// This is the :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
// This is the :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
// last processed CDS discovery response. If there are only static bootstrap clusters, this field
// will be "".
string version_info = 1;
Expand Down Expand Up @@ -280,7 +282,7 @@ message RoutesConfigDump {
"envoy.admin.v2alpha.RoutesConfigDump.DynamicRouteConfig";

// This is the per-resource version information. This version is currently taken from the
// :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
// :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
// the route configuration was loaded.
string version_info = 1;

Expand Down Expand Up @@ -340,7 +342,7 @@ message ScopedRoutesConfigDump {
string name = 1;

// This is the per-resource version information. This version is currently taken from the
// :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
// :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
// the scoped routes configuration was loaded.
string version_info = 2;

Expand Down Expand Up @@ -450,7 +452,7 @@ message EndpointsConfigDump {
// [#next-free-field: 6]
message DynamicEndpointConfig {
// [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the
// :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
// :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
// the endpoint configuration was loaded.
string version_info = 1;

Expand Down
Expand Up @@ -169,8 +169,8 @@ message RuntimeFilter {
// randomly sample based on the runtime key value alone.
// *use_independent_randomness* can be used for logging kill switches within
// complex nested :ref:`AndFilter
// <envoy_api_msg_config.accesslog.v3.AndFilter>` and :ref:`OrFilter
// <envoy_api_msg_config.accesslog.v3.OrFilter>` blocks that are easier to
// <envoy_v3_api_msg_config.accesslog.v3.AndFilter>` and :ref:`OrFilter
// <envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks that are easier to
// reason about from a probability perspective (i.e., setting to true will
// cause the filter to behave like an independent random variable when
// composed within logical operator filters).
Expand Down
Expand Up @@ -9,6 +9,7 @@ import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/event_service_config.proto";
import "envoy/config/core/v3/extension.proto";
import "envoy/config/core/v3/resolver.proto";
import "envoy/config/core/v3/socket_option.proto";
import "envoy/config/listener/v3/listener.proto";
import "envoy/config/metrics/v3/stats.proto";
Expand All @@ -35,11 +36,11 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Bootstrap]
// This proto is supplied via the :option:`-c` CLI flag and acts as the root
// of the Envoy v2 configuration. See the :ref:`v2 configuration overview
// of the Envoy v3 configuration. See the :ref:`v3 configuration overview
// <config_overview_bootstrap>` for more detail.

// Bootstrap :ref:`configuration overview <config_overview_bootstrap>`.
// [#next-free-field: 30]
// [#next-free-field: 31]
message Bootstrap {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.bootstrap.v2.Bootstrap";
Expand All @@ -48,20 +49,20 @@ message Bootstrap {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.bootstrap.v2.Bootstrap.StaticResources";

// Static :ref:`Listeners <envoy_api_msg_config.listener.v3.Listener>`. These listeners are
// Static :ref:`Listeners <envoy_v3_api_msg_config.listener.v3.Listener>`. These listeners are
// available regardless of LDS configuration.
repeated listener.v3.Listener listeners = 1;

// If a network based configuration source is specified for :ref:`cds_config
// <envoy_api_field_config.bootstrap.v3.Bootstrap.DynamicResources.cds_config>`, it's necessary
// <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.DynamicResources.cds_config>`, it's necessary
// to have some initial cluster definitions available to allow Envoy to know
// how to speak to the management server. These cluster definitions may not
// use :ref:`EDS <arch_overview_dynamic_config_eds>` (i.e. they should be static
// IP or DNS-based).
repeated cluster.v3.Cluster clusters = 2;

// These static secrets can be used by :ref:`SdsSecretConfig
// <envoy_api_msg_extensions.transport_sockets.tls.v3.SdsSecretConfig>`
// <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.SdsSecretConfig>`
repeated envoy.extensions.transport_sockets.tls.v3.Secret secrets = 3;
}

Expand All @@ -72,15 +73,15 @@ message Bootstrap {

reserved 4;

// All :ref:`Listeners <envoy_api_msg_config.listener.v3.Listener>` are provided by a single
// All :ref:`Listeners <envoy_v3_api_msg_config.listener.v3.Listener>` are provided by a single
// :ref:`LDS <arch_overview_dynamic_config_lds>` configuration source.
core.v3.ConfigSource lds_config = 1;

// xdstp:// resource locator for listener collection.
// [#not-implemented-hide:]
string lds_resources_locator = 5;

// All post-bootstrap :ref:`Cluster <envoy_api_msg_config.cluster.v3.Cluster>` definitions are
// All post-bootstrap :ref:`Cluster <envoy_v3_api_msg_config.cluster.v3.Cluster>` definitions are
// provided by a single :ref:`CDS <arch_overview_dynamic_config_cds>`
// configuration source.
core.v3.ConfigSource cds_config = 2;
Expand All @@ -91,10 +92,10 @@ message Bootstrap {

// A single :ref:`ADS <config_overview_ads>` source may be optionally
// specified. This must have :ref:`api_type
// <envoy_api_field_config.core.v3.ApiConfigSource.api_type>` :ref:`GRPC
// <envoy_api_enum_value_config.core.v3.ApiConfigSource.ApiType.GRPC>`. Only
// :ref:`ConfigSources <envoy_api_msg_config.core.v3.ConfigSource>` that have
// the :ref:`ads <envoy_api_field_config.core.v3.ConfigSource.ads>` field set will be
// <envoy_v3_api_field_config.core.v3.ApiConfigSource.api_type>` :ref:`GRPC
// <envoy_v3_api_enum_value_config.core.v3.ApiConfigSource.ApiType.GRPC>`. Only
// :ref:`ConfigSources <envoy_v3_api_msg_config.core.v3.ConfigSource>` that have
// the :ref:`ads <envoy_v3_api_field_config.core.v3.ConfigSource.ads>` field set will be
// streamed on the ADS channel.
core.v3.ApiConfigSource ads_config = 3;
}
Expand Down Expand Up @@ -152,7 +153,7 @@ message Bootstrap {
ClusterManager cluster_manager = 4;

// Health discovery service config option.
// (:ref:`core.ApiConfigSource <envoy_api_msg_config.core.v3.ApiConfigSource>`)
// (:ref:`core.ApiConfigSource <envoy_v3_api_msg_config.core.v3.ApiConfigSource>`)
core.v3.ApiConfigSource hds_config = 14;

// Optional file system path to search for startup flag files.
Expand Down Expand Up @@ -200,7 +201,7 @@ message Bootstrap {
//
// .. attention::
// This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider
// <envoy_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider>`.
// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider>`.
trace.v3.Tracing tracing = 9
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

Expand All @@ -221,7 +222,7 @@ message Bootstrap {
// Enable :ref:`stats for event dispatcher <operations_performance>`, defaults to false.
// Note that this records a value for each iteration of the event loop on every thread. This
// should normally be minimal overhead, but when using
// :ref:`statsd <envoy_api_msg_config.metrics.v3.StatsdSink>`, it will send each observed value
// :ref:`statsd <envoy_v3_api_msg_config.metrics.v3.StatsdSink>`, it will send each observed value
// over the wire individually because the statsd protocol doesn't have any way to represent a
// histogram summary. Be aware that this can be a very large volume of data.
bool enable_dispatcher_stats = 16;
Expand All @@ -239,18 +240,27 @@ message Bootstrap {

// Optional proxy version which will be used to set the value of :ref:`server.version statistic
// <server_statistics>` if specified. Envoy will not process this value, it will be sent as is to
// :ref:`stats sinks <envoy_api_msg_config.metrics.v3.StatsSink>`.
// :ref:`stats sinks <envoy_v3_api_msg_config.metrics.v3.StatsSink>`.
google.protobuf.UInt64Value stats_server_version_override = 19;

// Always use TCP queries instead of UDP queries for DNS lookups.
// This may be overridden on a per-cluster basis in cds_config,
// when :ref:`dns_resolvers <envoy_api_field_config.cluster.v3.Cluster.dns_resolvers>` and
// :ref:`use_tcp_for_dns_lookups <envoy_api_field_config.cluster.v3.Cluster.use_tcp_for_dns_lookups>` are
// when :ref:`dns_resolvers <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolvers>` and
// :ref:`use_tcp_for_dns_lookups <envoy_v3_api_field_config.cluster.v3.Cluster.use_tcp_for_dns_lookups>` are
// specified.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple' API only uses UDP for DNS resolution.
bool use_tcp_for_dns_lookups = 20;
// This field is deprecated in favor of *dns_resolution_config*
// which aggregates all of the DNS resolver configuration in a single message.
bool use_tcp_for_dns_lookups = 20
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolution configuration which includes the underlying dns resolver addresses and options.
// This may be overridden on a per-cluster basis in cds_config, when
// :ref:`dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>`
// is specified.
core.v3.DnsResolutionConfig dns_resolution_config = 30;

// Specifies optional bootstrap extensions to be instantiated at startup time.
// Each item contains extension specific configuration.
Expand Down Expand Up @@ -291,7 +301,7 @@ message Bootstrap {

// Global map of CertificateProvider instances. These instances are referred to by name in the
// :ref:`CommonTlsContext.CertificateProviderInstance.instance_name
// <envoy_api_field_extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance.instance_name>`
// <envoy_v3_api_field_extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance.instance_name>`
// field.
// [#not-implemented-hide:]
map<string, core.v3.TypedExtensionConfig> certificate_provider_instances = 25;
Expand All @@ -309,7 +319,7 @@ message Admin {

// The path to write the access log for the administration server. If no
// access log is desired specify ‘/dev/null’. This is only required if
// :ref:`address <envoy_api_field_config.bootstrap.v3.Admin.address>` is set.
// :ref:`address <envoy_v3_api_field_config.bootstrap.v3.Admin.address>` is set.
// Deprecated in favor of *access_log* which offers more options.
string access_log_path = 1
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];
Expand Down Expand Up @@ -349,9 +359,9 @@ message ClusterManager {
// this configuration). In order to enable :ref:`zone aware routing
// <arch_overview_load_balancing_zone_aware_routing>` this option must be set.
// If *local_cluster_name* is defined then :ref:`clusters
// <envoy_api_msg_config.cluster.v3.Cluster>` must be defined in the :ref:`Bootstrap
// <envoy_v3_api_msg_config.cluster.v3.Cluster>` must be defined in the :ref:`Bootstrap
// static cluster resources
// <envoy_api_field_config.bootstrap.v3.Bootstrap.StaticResources.clusters>`. This is unrelated to
// <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.StaticResources.clusters>`. This is unrelated to
// the :option:`--service-cluster` option which does not `affect zone aware
// routing <https://github.com/envoyproxy/envoy/issues/774>`_.
string local_cluster_name = 1;
Expand All @@ -365,8 +375,8 @@ message ClusterManager {

// A management server endpoint to stream load stats to via
// *StreamLoadStats*. This must have :ref:`api_type
// <envoy_api_field_config.core.v3.ApiConfigSource.api_type>` :ref:`GRPC
// <envoy_api_enum_value_config.core.v3.ApiConfigSource.ApiType.GRPC>`.
// <envoy_v3_api_field_config.core.v3.ApiConfigSource.api_type>` :ref:`GRPC
// <envoy_v3_api_enum_value_config.core.v3.ApiConfigSource.ApiType.GRPC>`.
core.v3.ApiConfigSource load_stats_config = 4;
}

Expand Down