Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,9 @@ public void onNext(ProcessingResponse response) {
}
}

if (response.getRequestDrain()) {
@SuppressWarnings("deprecation") // Replaced by request_drain_requests/responses.
boolean requestDrain = response.getRequestDrain();
if (requestDrain) {
extProcStreamState.set(ExtProcStreamState.DRAINING);
halfCloseExtProcStream();
activateCall();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
* Unit tests for {@link ExternalProcessorFilter}.
*/
@RunWith(JUnit4.class)
@SuppressWarnings("deprecation") // request_drain, replaced by request_drain_requests/responses.
public class ExternalProcessorClientInterceptorTest {
private static final String INSECURE_CREDENTIALS_TYPE_URL =
"type.googleapis.com/envoy.extensions.grpc_service."
Expand Down
3 changes: 2 additions & 1 deletion xds/third_party/envoy/import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

set -e
# import VERSION from the google internal go/envoy-import-status
VERSION=ddf9f6788e3b5c103c496784f04890acbc6628e5
VERSION=c282cb6c80e173a79cc0e989adae694f7556f7e9
DOWNLOAD_URL="https://github.com/envoyproxy/envoy/archive/${VERSION}.tar.gz"
DOWNLOAD_BASE_DIR="envoy-${VERSION}"
SOURCE_PROTO_BASE_DIR="${DOWNLOAD_BASE_DIR}/api"
Expand Down Expand Up @@ -93,6 +93,7 @@ envoy/extensions/grpc_service/channel_credentials/insecure/v3/insecure_credentia
envoy/extensions/grpc_service/channel_credentials/local/v3/local_credentials.proto
envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.proto
envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.proto
envoy/extensions/load_balancing_policies/autosharding/v3/autosharding.proto
envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
envoy/extensions/load_balancing_policies/common/v3/common.proto
envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// <config_overview_bootstrap>` for more detail.

// Bootstrap :ref:`configuration overview <config_overview_bootstrap>`.
// [#next-free-field: 44]
// [#next-free-field: 45]
message Bootstrap {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.bootstrap.v2.Bootstrap";
Expand Down Expand Up @@ -239,6 +239,14 @@ message Bootstrap {
// are marked as unused. Must be a multiple of the ``stats_flush_interval``.
google.protobuf.Duration stats_eviction_interval = 42
[(validate.rules).duration = {gte {nanos: 1000000}}];

// Optional runtime derived duration, in milliseconds, to perform metric eviction. The runtime
// key is read on every stats flush, so the interval can be changed without restarting Envoy.
// ``default_value`` is used if the runtime key is not set, or if its value is not a multiple of
// the ``stats_flush_interval``. A value of 0 disables eviction. ``default_value`` must also be a
// multiple of the ``stats_flush_interval``. See ``stats_eviction_interval`` for how eviction
// works.
core.v3.RuntimeUInt64 runtime_stats_eviction_interval = 44;
}

// Optional watchdog configuration.
Expand Down Expand Up @@ -431,7 +439,8 @@ message Bootstrap {
GrpcAsyncClientManagerConfig grpc_async_client_manager_config = 40;

// Optional configuration for memory allocation manager.
// Memory releasing is only supported for `tcmalloc allocator <https://github.com/google/tcmalloc>`_.
// Memory releasing is supported with `tcmalloc <https://github.com/google/tcmalloc>`_ and
// `gperftools <https://github.com/gperftools/gperftools>`_.
MemoryAllocatorManager memory_allocator_manager = 41;

// When enabled, Envoy pins each worker thread to a distinct CPU from the process affinity mask,
Expand Down Expand Up @@ -790,13 +799,14 @@ message CustomInlineHeader {

// [#next-free-field: 6]
message MemoryAllocatorManager {
// Configures tcmalloc to perform background release of free memory in amount of bytes per ``memory_release_interval`` interval.
// If equals to ``0``, no memory release will occur. Defaults to ``0``.
// Configures tcmalloc to perform background release of free memory in amount of bytes per
// ``memory_release_interval`` interval. If equals to ``0``, no memory release will occur.
// Defaults to ``0``.
uint64 bytes_to_release = 1;

// Interval in milliseconds for memory releasing. If specified, during every
// interval Envoy will try to release ``bytes_to_release`` of free memory back to operating system for reuse.
// Defaults to ``1000`` milliseconds.
// Interval in milliseconds for memory releasing. If specified, during every interval Envoy will
// try to release ``bytes_to_release`` of free memory back to operating system for reuse. If set
// to ``0``, no memory release will occur. Defaults to ``1000`` milliseconds.
google.protobuf.Duration memory_release_interval = 2;

// Sets the soft memory limit for tcmalloc. When the total memory used by tcmalloc exceeds this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ message Cluster {
// configuration for the cluster. If no
// configuration is specified no health checking will be done and all cluster
// members will be considered healthy at all times.
repeated core.v3.HealthCheck health_checks = 8;
repeated core.v3.HealthCheck health_checks = 8 [(validate.rules).repeated = {max_items: 8}];

// Optional maximum requests for a single upstream connection. This parameter
// is respected by both the HTTP/1.1 and HTTP/2 connection pool
Expand Down Expand Up @@ -1129,12 +1129,35 @@ message Cluster {
// [#extension-category: envoy.network.dns_resolver]
core.v3.TypedExtensionConfig typed_dns_resolver_config = 55;

// Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
// or :ref:`Redis Cluster<arch_overview_redis>`.
// If true, cluster readiness blocks on warm-up. If false, the cluster will complete
// initialization whether or not warm-up has completed. Defaults to true.
// Controls whether a warming cluster gates the CDS ACK sent to the management server.
// Defaults to true.
//
// When ``true`` (default), Envoy holds back the CDS ACK while the cluster is warming, so an
// ADS implementation can detect cluster readiness before sending dependent RDS updates. This
// reduces 503s from routes referencing clusters that are not yet ready.
//
// When ``false``, the cluster is excluded from that hold: it continues warming normally but
// no longer gates the CDS ACK. Set this to ``false`` when a cluster may warm slowly or
// indefinitely (e.g. a missing SDS secret or EDS endpoints not yet delivered by the control
// plane) and you want to avoid stalling all other ADS updates.
//
// .. note::
// Clusters added during server initialization are not subject to CDS pause gating; this
// field only affects clusters added or updated via CDS after initialization completes.
//
// .. note::
// Setting this to ``false`` accepts a window where requests may receive 503 responses if
// routes reference this cluster before it finishes warming.
//
// For :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
// :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
// and :ref:`Redis Cluster<arch_overview_redis>`, setting this to ``false`` additionally causes
// the cluster to complete initialization immediately without waiting for DNS to resolve,
// making the cluster active right away with zero hosts. Hosts are added as DNS and (for Redis)
// ``CLUSTER SLOTS`` responses arrive. If SDS-backed TLS is configured, the cluster still waits
// for the secret regardless of this field; set ``initial_fetch_timeout`` on the
// :ref:`SdsSecretConfig.sds_config<envoy_v3_api_field_extensions.transport_sockets.tls.v3.SdsSecretConfig.sds_config>`
// to bound that wait.
google.protobuf.BoolValue wait_for_warm_on_init = 54;

// If specified, outlier detection will be enabled for this upstream cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ message ExtraSourceAddress {
SocketOptionsOverride socket_options = 2;
}

// [#next-free-field: 7]
// [#next-free-field: 8]
message BindConfig {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.BindConfig";

Expand Down Expand Up @@ -180,6 +180,24 @@ message BindConfig {
// <envoy_v3_api_msg_config.upstream.local_address_selector.v3.DefaultLocalAddressSelector>`).
// [#extension-category: envoy.upstream.local_address_selector]
TypedExtensionConfig local_address_selector = 6;

// If set to true, the :ref:`network_namespace_filepath
// <envoy_v3_api_field_config.core.v3.SocketAddress.network_namespace_filepath>` of every source
// address in this bind config is validated when the configuration is loaded, and the
// configuration is rejected if a referenced network namespace cannot be opened.
//
// By default no such validation is performed: a network namespace that does not exist when the
// configuration is loaded may be created later, before connections are actually established, so
// eager validation would wrongly reject such configurations. If a namespace is unavailable when
// a connection is created, the connection attempt fails gracefully.
//
// Listener addresses do not need an equivalent option: a listener creates and binds its socket
// in the configured network namespace when the listener configuration is loaded, so an
// unavailable namespace always rejects the listener configuration.
//
// .. attention::
// Network namespaces are only configurable on Linux. Otherwise, this field has no effect.
bool validate_network_namespaces = 7;
}

// Addresses specify either a logical or physical address and port, which are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "envoy/type/v3/percent.proto";
import "envoy/type/v3/semantic_version.proto";

import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

Expand Down Expand Up @@ -486,6 +487,11 @@ message HeaderValueOption {

// Is the header value allowed to be empty? If false (default), custom headers with empty values are dropped,
// otherwise they are added.
//
// .. note::
// In any context other than the router filter, we always act as if keep_empty_value is true,
// regardless of the setting of this field.
//
bool keep_empty_value = 4;
}

Expand Down Expand Up @@ -551,7 +557,7 @@ message DataSource {
}

// The message specifies the retry policy of remote data source when fetching fails.
// [#next-free-field: 7]
// [#next-free-field: 8]
message RetryPolicy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.RetryPolicy";

Expand Down Expand Up @@ -594,6 +600,11 @@ message RetryPolicy {

// For details, see :ref:`host_selection_retry_max_attempts <envoy_v3_api_field_config.route.v3.RetryPolicy.host_selection_retry_max_attempts>`.
int64 host_selection_retry_max_attempts = 6;

// Specifies a non-zero upstream timeout per retry attempt (including the initial attempt).
// This parameter is optional. For details, see :ref:`per_try_timeout
// <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`.
google.protobuf.Duration per_try_timeout = 7 [(validate.rules).duration = {gt {}}];
}

// The message specifies how to fetch data from remote and how to verify it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,25 @@ message RateLimitSettings {

// Local filesystem path configuration source.
message PathConfigSource {
// Path on the filesystem to source and watch for configuration updates.
// When sourcing configuration for a :ref:`secret <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.Secret>`,
// the certificate and key files are also watched for updates.
// Path on the filesystem from which to source configuration updates.
// When sourcing configuration for a
// :ref:`secret <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.Secret>`, file-based secret
// data supported for SDS rotation is also monitored for updates.
//
// .. note::
//
// The path to the source must exist at config load time.
//
// .. note::
//
// If ``watched_directory`` is *not* configured, Envoy will watch the file path for *moves*.
// This is because in general only moves are atomic. The same method of swapping files as is
// demonstrated in the :ref:`runtime documentation <config_runtime_symbolic_link_swap>` can be
// used here also. If ``watched_directory`` is configured, no watch will be placed directly on
// this path. Instead, the configured ``watched_directory`` will be used to trigger reloads of
// this path. This is required in certain deployment scenarios. See below for more information.
// If neither ``poll_interval`` nor ``watched_directory`` is configured, Envoy will watch the
// file path for *moves*. This is because in general only moves are atomic. The same method of
// swapping files as is demonstrated in the
// :ref:`runtime documentation <config_runtime_symbolic_link_swap>` can be used here also.
// One of ``poll_interval`` and ``watched_directory`` can also be configured; the configuration
// is rejected if both are set. With ``poll_interval``, the same path is reloaded periodically.
// With ``watched_directory``, no watch is placed directly on this path; events in the
// configured directory trigger this path to be reloaded.
string path = 1 [(validate.rules).string = {min_len: 1}];

// If configured, this directory will be watched for *moves*. When an entry in this directory is
Expand All @@ -188,7 +191,24 @@ message PathConfigSource {
//
// The above configuration will ensure that Envoy watches the owning directory for moves which is
// required due to how Kubernetes manages ConfigMap symbolic links during atomic updates.
//
// This field cannot be used together with ``poll_interval``.
WatchedDirectory watched_directory = 2;

// If configured, the ``path`` will be polled at this interval instead of watched for filesystem
// events on either the file or ``watched_directory``. This is useful when the underlying
// filesystem does not reliably provide change notifications, or when a custom deployment model
// does not generate the move or modification events handled by watching the path or directory.
// The file is read on every poll, but an update is delivered only when its parsed contents
// change.
//
// When this configuration source provides a
// :ref:`Secret <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.Secret>`, the same secret
// files that are watched in event-based mode are polled at this interval. The last successfully
// loaded configuration or secret remains active when a poll fails.
//
// This field cannot be used together with ``watched_directory`` and must be at least 1ms.
google.protobuf.Duration poll_interval = 3 [(validate.rules).duration = {gte {nanos: 1000000}}];
}

// Configuration for :ref:`listeners <config_listeners>`, :ref:`clusters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
message GrpcService {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.GrpcService";

// [#next-free-field: 6]
// [#next-free-field: 7]
message EnvoyGrpc {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.core.GrpcService.EnvoyGrpc";
Expand Down Expand Up @@ -72,6 +72,28 @@ message GrpcService {
// If true, the header will be removed and can not be overridden by per stream option.
// Default to false.
bool skip_envoy_headers = 5;

// How many bytes each stream can buffer internally. This is the buffer limit of the
// underlying Envoy HTTP async client stream, and it has two effects:
//
// * Retries: when
// :ref:`retry_policy <envoy_v3_api_field_config.core.v3.GrpcService.retry_policy>` or a
// caller-provided retry policy is set, the request is buffered so that it can be replayed on
// a retry. For a streaming call this counts every message sent until the upstream sends
// response headers (initial metadata). Once the buffered data exceeds this limit, the
// request is no longer retried and the upstream cluster's ``retry_or_shadow_abandoned``
// counter is incremented. Up to this many bytes per stream can be held in memory until the
// stream completes.
// * Flow control: this is the high watermark for data buffered before the upstream stream is
// ready to accept it. Above it, the stream reports that it is above its write buffer high
// watermark, and callers that check this, such as the streaming gRPC access loggers, stop
// sending on the stream. It also triggers the sidestream watermark callbacks, which
// ext_proc uses to push back on the downstream.
//
// A per-stream buffer limit set by the caller takes precedence over this value. If not set,
// the default buffer limit of the Envoy HTTP async client, 64 KiB, is used.
google.protobuf.UInt32Value per_stream_buffer_limit_bytes = 6
[(validate.rules).uint32 = {gt: 0}];
}

// [#next-free-field: 11]
Expand Down
Loading