Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into retry-filter
Browse files Browse the repository at this point in the history
* origin/master: (34 commits)
  fuzz: fixes oss-fuzz: 9895 (envoyproxy#4189)
  docs: added developer docs for pprof/tcmalloc testing (envoyproxy#4194)
  fix sometimes returns response body to HEAD requests (envoyproxy#3985)
  admin: fix config dump order (envoyproxy#4197)
  thrift: allow translation between downstream and upstream protocols (envoyproxy#4136)
  Use local_info.node() instead of bootstrap.node() whenever possible (envoyproxy#4120)
  upstream: allow extension protocol options to be used with http filters (envoyproxy#4165)
  [thrift_proxy] Replace local HeaderMap with Http::HeaderMap[Impl] (envoyproxy#4169)
  docs: improve gRPC-JSON filter doc (envoyproxy#4184)
  stats: refactoring MetricImpl without strings (envoyproxy#4190)
  fuzz: coverage profile generation instructions. (envoyproxy#4193)
  upstream: rebuild cluster when health check config is changed (envoyproxy#4075)
  build: use clang-6.0. (envoyproxy#4168)
  thrift_proxy: introduce header transport (envoyproxy#4082)
  tcp: allow connection pool callers to store protocol state (envoyproxy#4131)
  configs: match latest API changes (envoyproxy#4185)
  Fix wrong mock function name. (envoyproxy#4187)
  Bump yaml-cpp so it builds with Visual Studio 15.8 (envoyproxy#4182)
  Converting envoy configs to V2 (envoyproxy#2957)
  Add timestamp to HealthCheckEvent definition (envoyproxy#4119)
  ...

Signed-off-by: Snow Pettersen <snowp@squareup.com>
  • Loading branch information
snowp committed Aug 20, 2018
2 parents 62eb968 + db4783b commit 0295cdd
Show file tree
Hide file tree
Showing 385 changed files with 6,586 additions and 2,190 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
references:
envoy-build-image: &envoy-build-image
envoyproxy/envoy-build:1ef23d481a4701ad4a414d1ef98036bd2ed322e7
envoyproxy/envoy-build:e994c1c0b1cdc9a9470cff728311ff7c995685e6

version: 2
jobs:
Expand Down
2 changes: 2 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Below is a list of additional documentation to aid the development process:

- [Envoy filter example project (how to consume and extend Envoy as a submodule)](https://github.com/envoyproxy/envoy-filter-example)

- [Performance testing Envoy with `tcmalloc`/`pprof`](https://github.com/envoyproxy/envoy/tree/bazel/PPROF.md)

And some documents on components of Envoy architecture:

- [Envoy flow control](https://github.com/envoyproxy/envoy/blob/master/source/docs/flow_control.md)
Expand Down
1 change: 1 addition & 0 deletions api/docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ proto_library(
"//envoy/config/filter/network/rbac/v2:rbac",
"//envoy/config/filter/network/redis_proxy/v2:redis_proxy",
"//envoy/config/filter/network/tcp_proxy/v2:tcp_proxy",
"//envoy/config/filter/network/thrift_proxy/v2alpha1:thrift_proxy",
"//envoy/config/grpc_credential/v2alpha:file_based_metadata",
"//envoy/config/health_checker/redis/v2:redis",
"//envoy/config/metrics/v2:metrics_service",
Expand Down
10 changes: 5 additions & 5 deletions api/envoy/admin/v2alpha/config_dump.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ import "gogoproto/gogo.proto";
// The :ref:`/config_dump <operations_admin_interface_config_dump>` admin endpoint uses this wrapper
// message to maintain and serve arbitrary configuration information from any component in Envoy.
message ConfigDump {
// This map is serialized and dumped in its entirety at the
// This list is serialized and dumped in its entirety at the
// :ref:`/config_dump <operations_admin_interface_config_dump>` endpoint.
//
// Keys are a short descriptor of the config object they map to. The following keys (and the
// messages they map to) are currently supported:
// The following configurations are currently supported and will be dumped in the order given
// below:
//
// * *bootstrap*: :ref:`BootstrapConfigDump <envoy_api_msg_admin.v2alpha.BootstrapConfigDump>`
// * *listeners*: :ref:`ListenersConfigDump <envoy_api_msg_admin.v2alpha.ListenersConfigDump>`
// * *clusters*: :ref:`ClustersConfigDump <envoy_api_msg_admin.v2alpha.ClustersConfigDump>`
// * *listeners*: :ref:`ListenersConfigDump <envoy_api_msg_admin.v2alpha.ListenersConfigDump>`
// * *routes*: :ref:`RoutesConfigDump <envoy_api_msg_admin.v2alpha.RoutesConfigDump>`
map<string, google.protobuf.Any> configs = 1 [(gogoproto.nullable) = false];
repeated google.protobuf.Any configs = 1 [(gogoproto.nullable) = false];
}

// This message describes the bootstrap configuration that Envoy was started with. This includes
Expand Down
12 changes: 12 additions & 0 deletions api/envoy/api/v2/eds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "google/api/annotations.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/wrappers.proto";

option (gogoproto.equal_all) = true;

Expand Down Expand Up @@ -80,6 +81,17 @@ message ClusterLoadAssignment {
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
repeated DropOverload drop_overloads = 2;

// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%.
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32.gt = 0];
}

// Load balancing policy settings.
Expand Down
24 changes: 19 additions & 5 deletions api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ option go_package = "v2";
import "validate/validate.proto";
import "gogoproto/gogo.proto";

// [#protodoc-title: Thrift route configuration]
// [#protodoc-title: Thrift Proxy Route Configuration]
// Thrift Proxy :ref:`configuration overview <config_network_filters_thrift_proxy>`.

// [#comment:next free field: 3]
message RouteConfiguration {
Expand All @@ -27,11 +28,24 @@ message Route {
RouteAction route = 2 [(validate.rules).message.required = true, (gogoproto.nullable) = false];
}

// [#comment:next free field: 2]
// [#comment:next free field: 4]
message RouteMatch {
// If specified, the route must exactly match the request method name. As a special case, an
// empty string matches any request method name.
string method = 1;
oneof match_specifier {
option (validate.required) = true;

// If specified, the route must exactly match the request method name. As a special case, an
// empty string matches any request method name.
string method_name = 1;

// If specified, the route must have the service name as the request method name prefix. As a
// special case, an empty string matches any service name. Only relevant when service
// multiplexing.
string service_name = 2;
}

// Inverts whatever matching is done in match_specifier. Cannot be combined with wildcard matching
// as that would result in routes never being matched.
bool invert = 3;
}

// [#comment:next free field: 2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,79 @@ import "envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";

// [#protodoc-title: Extensions Thrift Proxy]
// Thrift Proxy filter configuration.
// [#protodoc-title: Thrift Proxy]
// Thrift Proxy :ref:`configuration overview <config_network_filters_thrift_proxy>`.

// [#comment:next free field: 5]
message ThriftProxy {
enum TransportType {
option (gogoproto.goproto_enum_prefix) = false;
// Supplies the type of transport that the Thrift proxy should use. Defaults to
// :ref:`AUTO_TRANSPORT<envoy_api_enum_value_config.filter.network.thrift_proxy.v2alpha1.TransportType.AUTO_TRANSPORT>`.
TransportType transport = 2 [(validate.rules).enum.defined_only = true];

// For every new connection, the Thrift proxy will determine which transport to use.
AUTO_TRANSPORT = 0;
// Supplies the type of protocol that the Thrift proxy should use. Defaults to
// :ref:`AUTO_PROTOCOL<envoy_api_enum_value_config.filter.network.thrift_proxy.v2alpha1.ProtocolType.AUTO_PROTOCOL>`.
ProtocolType protocol = 3 [(validate.rules).enum.defined_only = true];

// The Thrift proxy will assume the client is using the Thrift framed transport.
FRAMED = 1;
// The human readable prefix to use when emitting statistics.
string stat_prefix = 1 [(validate.rules).string.min_bytes = 1];

// The Thrift proxy will assume the client is using the Thrift unframed transport.
UNFRAMED = 2;
}
// The route table for the connection manager is static and is specified in this property.
RouteConfiguration route_config = 4;
}

// Supplies the type of transport that the Thrift proxy should use. Defaults to `AUTO_TRANSPORT`.
TransportType transport = 2 [(validate.rules).enum.defined_only = true];
// Thrift transport types supported by Envoy.
enum TransportType {
option (gogoproto.goproto_enum_prefix) = false;

enum ProtocolType {
option (gogoproto.goproto_enum_prefix) = false;
// For downstream connections, the Thrift proxy will attempt to determine which transport to use.
// For upstream connections, the Thrift proxy will use same transport as the downstream
// connection.
AUTO_TRANSPORT = 0;

// For every new connection, the Thrift proxy will determine which protocol to use.
// N.B. The older, non-strict binary protocol is not included in automatic protocol
// detection.
AUTO_PROTOCOL = 0;
// The Thrift proxy will use the Thrift framed transport.
FRAMED = 1;

// The Thrift proxy will assume the client is using the Thrift binary protocol.
BINARY = 1;
// The Thrift proxy will use the Thrift unframed transport.
UNFRAMED = 2;

// The Thrift proxy will assume the client is using the Thrift non-strict binary protocol.
LAX_BINARY = 2;
// The Thrift proxy will assume the client is using the Thrift header transport.
HEADER = 3;
}

// The Thrift proxy will assume the client is using the Thrift compact protocol.
COMPACT = 3;
}
// Thrift Protocol types supported by Envoy.
enum ProtocolType {
option (gogoproto.goproto_enum_prefix) = false;

// Supplies the type of protocol that the Thrift proxy should use. Defaults to `AUTO_PROTOCOL`.
ProtocolType protocol = 3 [(validate.rules).enum.defined_only = true];
// For downstream connections, the Thrift proxy will attempt to determine which protocol to use.
// Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol
// detection. For upstream connections, the Thrift proxy will use the same protocol as the
// downstream connection.
AUTO_PROTOCOL = 0;

// The human readable prefix to use when emitting statistics.
string stat_prefix = 1 [(validate.rules).string.min_bytes = 1];
// The Thrift proxy will use the Thrift binary protocol.
BINARY = 1;

// The route table for the connection manager is static and is specified in this property.
RouteConfiguration route_config = 4;
// The Thrift proxy will use Thrift non-strict binary protocol.
LAX_BINARY = 2;

// The Thrift proxy will use the Thrift compact protocol.
COMPACT = 3;
}

// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in
// in :ref:`extension_protocol_options<envoy_api_field_Cluster.extension_protocol_options>`, keyed
// by the name `envoy.filters.network.thrift_proxy`.
// [#comment:next free field: 3]
message ThriftProtocolOptions {
// Supplies the type of transport that the Thrift proxy should use for upstream connections.
// Selecting
// :ref:`AUTO_TRANSPORT<envoy_api_enum_value_config.filter.network.thrift_proxy.v2alpha1.TransportType.AUTO_TRANSPORT>`,
// which is the default, causes the proxy to use the same transport as the downstream connection.
TransportType transport = 1 [(validate.rules).enum.defined_only = true];

// Supplies the type of protocol that the Thrift proxy should use for upstream connections.
// Selecting
// :ref:`AUTO_PROTOCOL<envoy_api_enum_value_config.filter.network.thrift_proxy.v2alpha1.ProtocolType.AUTO_PROTOCOL>`,
// which is the default, causes the proxy to use the same protocol as the downstream connection.
ProtocolType protocol = 2 [(validate.rules).enum.defined_only = true];
}
4 changes: 4 additions & 0 deletions api/envoy/data/core/v2alpha/health_check_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
Expand All @@ -30,6 +31,9 @@ message HealthCheckEvent {
// Host addition.
HealthCheckAddHealthy add_healthy_event = 5;
}

// Timestamp for event.
google.protobuf.Timestamp timestamp = 6 [(gogoproto.stdtime) = true];
}

enum HealthCheckFailureType {
Expand Down
2 changes: 2 additions & 0 deletions api/envoy/service/ratelimit/v2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ api_proto_library_internal(
srcs = ["rls.proto"],
has_services = 1,
deps = [
"//envoy/api/v2/core:base",
"//envoy/api/v2/core:grpc_service",
"//envoy/api/v2/ratelimit",
],
Expand All @@ -16,6 +17,7 @@ api_go_grpc_library(
name = "rls",
proto = ":rls",
deps = [
"//envoy/api/v2/core:base_go_proto",
"//envoy/api/v2/core:grpc_service_go_proto",
"//envoy/api/v2/ratelimit:ratelimit_go_proto",
],
Expand Down
3 changes: 3 additions & 0 deletions api/envoy/service/ratelimit/v2/rls.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package envoy.service.ratelimit.v2;
option go_package = "v2";

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

import "validate/validate.proto";
Expand Down Expand Up @@ -75,4 +76,6 @@ message RateLimitResponse {
// in the RateLimitRequest. This can be used by the caller to determine which individual
// descriptors failed and/or what the currently configured limits are for all of them.
repeated DescriptorStatus statuses = 2;
// A list of headers to add to the response
repeated envoy.api.v2.core.HeaderValue headers = 3;
}
Loading

0 comments on commit 0295cdd

Please sign in to comment.