Skip to content

Commit

Permalink
Merge pull request #14 from envoyproxy/master
Browse files Browse the repository at this point in the history
Sync Fork from Upstream repo
  • Loading branch information
sthagen authored Sep 7, 2019
2 parents dc7a24b + 6f273c2 commit 746d493
Show file tree
Hide file tree
Showing 325 changed files with 1,363 additions and 1,459 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Checks: 'abseil-*,
bugprone-*,
clang-analyzer-*,
clang-diagnostic-*,
misc-unused-using-decls,
modernize-*,
performance-*,
readability-braces-around-statements,
Expand All @@ -20,6 +21,7 @@ WarningsAsErrors: 'abseil-duration-*,
bugprone-unused-raii,
bugprone-use-after-move,
clang-analyzer-core.DivideZero,
misc-unused-using-decls,
modernize-deprecated-headers,
modernize-loop-convert,
modernize-make-shared,
Expand Down
4 changes: 0 additions & 4 deletions api/bazel/api_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ _COMMON_PROTO_DEPS = [
"@com_google_googleapis//google/api:http_proto",
"@com_google_googleapis//google/api:annotations_proto",
"@com_google_googleapis//google/rpc:status_proto",
"@com_github_gogo_protobuf//:gogo_proto",
"@com_envoyproxy_protoc_gen_validate//validate:validate_proto",
]

Expand Down Expand Up @@ -50,7 +49,6 @@ def api_py_proto_library(name, srcs = [], deps = [], external_py_proto_deps = []
"@com_google_googleapis//google/api:annotations_py_proto",
"@com_google_googleapis//google/api:http_py_proto",
"@com_google_googleapis//google/api:httpbody_py_proto",
"@com_github_gogo_protobuf//:gogo_proto_py",
],
visibility = ["//visibility:public"],
)
Expand Down Expand Up @@ -108,7 +106,6 @@ def api_proto_library(
name = _Suffix(name, _CC_SUFFIX),
linkstatic = linkstatic,
cc_deps = [_LibrarySuffix(d, _CC_SUFFIX) for d in deps] + external_cc_proto_deps + [
"@com_github_gogo_protobuf//:gogo_proto_cc",
"@com_google_googleapis//google/api:http_cc_proto",
"@com_google_googleapis//google/api:annotations_cc_proto",
"@com_google_googleapis//google/rpc:status_cc_proto",
Expand Down Expand Up @@ -180,7 +177,6 @@ def api_proto_package(name = "pkg", srcs = [], deps = [], has_services = False,
proto = name,
visibility = ["//visibility:public"],
deps = [go_proto_mapping(dep) for dep in deps] + [
"@com_github_gogo_protobuf//:gogo_proto_go",
"@com_github_golang_protobuf//ptypes:go_default_library",
"@com_github_golang_protobuf//ptypes/any:go_default_library",
"@com_github_golang_protobuf//ptypes/duration:go_default_library",
Expand Down
61 changes: 1 addition & 60 deletions api/bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ def api_dependencies():
name = "com_github_cncf_udpa",
locations = REPOSITORY_LOCATIONS,
)
envoy_http_archive(
name = "com_github_gogo_protobuf",
locations = REPOSITORY_LOCATIONS,
build_file_content = GOGOPROTO_BUILD_CONTENT,
)

envoy_http_archive(
name = "prometheus_metrics_model",
locations = REPOSITORY_LOCATIONS,
Expand All @@ -44,61 +40,6 @@ def api_dependencies():
build_file_content = ZIPKINAPI_BUILD_CONTENT,
)

GOGOPROTO_BUILD_CONTENT = """
load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library", "py_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
proto_library(
name = "gogo_proto",
srcs = [
"gogoproto/gogo.proto",
],
deps = [
"@com_google_protobuf//:descriptor_proto",
],
visibility = ["//visibility:public"],
)
go_proto_library(
name = "descriptor_go_proto",
importpath = "github.com/golang/protobuf/protoc-gen-go/descriptor",
proto = "@com_google_protobuf//:descriptor_proto",
visibility = ["//visibility:public"],
)
cc_proto_library(
name = "gogo_proto_cc",
srcs = [
"gogoproto/gogo.proto",
],
default_runtime = "@com_google_protobuf//:protobuf",
protoc = "@com_google_protobuf//:protoc",
deps = ["@com_google_protobuf//:cc_wkt_protos"],
visibility = ["//visibility:public"],
)
go_proto_library(
name = "gogo_proto_go",
importpath = "gogoproto",
proto = ":gogo_proto",
visibility = ["//visibility:public"],
deps = [
":descriptor_go_proto",
],
)
py_proto_library(
name = "gogo_proto_py",
srcs = [
"gogoproto/gogo.proto",
],
default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@com_google_protobuf//:protoc",
visibility = ["//visibility:public"],
deps = ["@com_google_protobuf//:protobuf_python"],
)
"""

PROMETHEUSMETRICS_BUILD_CONTENT = """
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
Expand Down
8 changes: 0 additions & 8 deletions api/bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
BAZEL_SKYLIB_RELEASE = "0.8.0"
BAZEL_SKYLIB_SHA256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e"

GOGOPROTO_RELEASE = "1.2.1"
GOGOPROTO_SHA256 = "99e423905ba8921e86817607a5294ffeedb66fdd4a85efce5eb2848f715fdb3a"

OPENCENSUS_PROTO_GIT_SHA = "5cec5ea58c3efa81fa808f2bd38ce182da9ee731" # Jul 25, 2019
OPENCENSUS_PROTO_SHA256 = "faeb93f293ff715b0cb530d273901c0e2e99277b9ed1c0a0326bca9ec5774ad2"

Expand Down Expand Up @@ -45,11 +42,6 @@ REPOSITORY_LOCATIONS = dict(
strip_prefix = "udpa-" + UDPA_GIT_SHA,
urls = ["https://github.com/cncf/udpa/archive/" + UDPA_GIT_SHA + ".tar.gz"],
),
com_github_gogo_protobuf = dict(
sha256 = GOGOPROTO_SHA256,
strip_prefix = "protobuf-" + GOGOPROTO_RELEASE,
urls = ["https://github.com/gogo/protobuf/archive/v" + GOGOPROTO_RELEASE + ".tar.gz"],
),
prometheus_metrics_model = dict(
sha256 = PROMETHEUS_SHA,
strip_prefix = "client_model-" + PROMETHEUS_GIT_SHA,
Expand Down
2 changes: 0 additions & 2 deletions api/envoy/admin/v2alpha/config_dump.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import "envoy/config/bootstrap/v2/bootstrap.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";

import "gogoproto/gogo.proto";

// [#protodoc-title: ConfigDump]

// The :ref:`/config_dump <operations_admin_interface_config_dump>` admin endpoint uses this wrapper
Expand Down
2 changes: 0 additions & 2 deletions api/envoy/admin/v3alpha/config_dump.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import "envoy/config/bootstrap/v3alpha/bootstrap.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";

import "gogoproto/gogo.proto";

// [#protodoc-title: ConfigDump]

// The :ref:`/config_dump <operations_admin_interface_config_dump>` admin endpoint uses this wrapper
Expand Down
3 changes: 0 additions & 3 deletions api/envoy/api/v2/auth/cert.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: Common TLS configuration]

Expand Down
63 changes: 52 additions & 11 deletions api/envoy/api/v2/cds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;

// Return list of all clusters this proxy will load balance to.
service ClusterDiscoveryService {
Expand All @@ -52,7 +48,7 @@ service ClusterDiscoveryService {
// [#protodoc-title: Clusters]

// Configuration for a single upstream cluster.
// [#comment:next free field: 41]
// [#comment:next free field: 42]
message Cluster {
// Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting
Expand Down Expand Up @@ -127,8 +123,7 @@ message Cluster {
EdsClusterConfig eds_cluster_config = 3;

// The timeout for new network connections to hosts in the cluster.
google.protobuf.Duration connect_timeout = 4
[(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true];
google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration.gt = {}];

// Soft limit on size of the cluster’s connections read and write buffers. If
// unspecified, an implementation defined default is applied (1MiB).
Expand Down Expand Up @@ -175,6 +170,13 @@ message Cluster {
// specific load balancer. Consult the configured cluster's documentation for whether to set
// this option or not.
CLUSTER_PROVIDED = 6;

// [#not-implemented-hide:] Use the new :ref:`load_balancing_policy
// <envoy_api_field_Cluster.load_balancing_policy>` field to determine the LB policy.
// [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field
// and instead using the new load_balancing_policy field as the one and only mechanism for
// configuring this.]
LOAD_BALANCING_POLICY_CONFIG = 7;
}
// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
// when picking a host in the cluster.
Expand Down Expand Up @@ -274,8 +276,7 @@ message Cluster {
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16
[(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true];
google.protobuf.Duration dns_refresh_rate = 16 [(validate.rules).duration.gt = {}];

// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
Expand Down Expand Up @@ -333,8 +334,7 @@ message Cluster {
// value defaults to 5000ms. For cluster types other than
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`
// this setting is ignored.
google.protobuf.Duration cleanup_interval = 20
[(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true];
google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration.gt = {}];

// Optional configuration used to bind newly established upstream connections.
// This overrides any bind_config specified in the bootstrap proto.
Expand Down Expand Up @@ -645,6 +645,47 @@ message Cluster {
// outgoing connections made by the cluster. Order matters as the filters are
// processed sequentially as connection events happen.
repeated cluster.Filter filters = 40;

// [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the
// :ref:`lb_policy<envoy_api_field_Cluster.lb_policy>` field has the value
// :ref:`LOAD_BALANCING_POLICY_CONFIG<envoy_api_enum_value_Cluster.LbPolicy.LOAD_BALANCING_POLICY_CONFIG>`.
LoadBalancingPolicy load_balancing_policy = 41;
}

// [#not-implemented-hide:] Extensible load balancing policy configuration.
//
// Every LB policy defined via this mechanism will be identified via a unique name using reverse
// DNS notation. If the policy needs configuration parameters, it must define a message for its
// own configuration, which will be stored in the config field. The name of the policy will tell
// clients which type of message they should expect to see in the config field.
//
// Note that there are cases where it is useful to be able to independently select LB policies
// for choosing a locality and for choosing an endpoint within that locality. For example, a
// given deployment may always use the same policy to choose the locality, but for choosing the
// endpoint within the locality, some clusters may use weighted-round-robin, while others may
// use some sort of session-based balancing.
//
// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a
// child LB policy for each locality. For each request, the parent chooses the locality and then
// delegates to the child policy for that locality to choose the endpoint within the locality.
//
// To facilitate this, the config message for the top-level LB policy may include a field of
// type LoadBalancingPolicy that specifies the child policy.
//
// [#proto-status: experimental]
message LoadBalancingPolicy {
message Policy {
// Required. The name of the LB policy.
string name = 1;
// Optional config for the LB policy.
// No more than one of these two fields may be populated.
google.protobuf.Struct config = 2;
google.protobuf.Any typed_config = 3;
}
// Each client will iterate over the list in order and stop at the first policy that it
// supports. This provides a mechanism for starting to use new LB policies that are not yet
// supported by all clients.
repeated Policy policies = 1;
}

// An extensible structure containing the address Envoy should bind to when
Expand Down
4 changes: 0 additions & 4 deletions api/envoy/api/v2/cluster/circuit_breaker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import "envoy/api/v2/core/base.proto";

import "google/protobuf/wrappers.proto";

import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: Circuit breakers]

// :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
Expand Down
3 changes: 0 additions & 3 deletions api/envoy/api/v2/cluster/filter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ option ruby_package = "Envoy.Api.V2.ClusterNS";
import "google/protobuf/any.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: Upstream filters]
//
Expand Down
3 changes: 0 additions & 3 deletions api/envoy/api/v2/cluster/outlier_detection.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: Outlier detection]

Expand Down
4 changes: 0 additions & 4 deletions api/envoy/api/v2/core/address.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import "envoy/api/v2/core/base.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: Network addresses]

Expand All @@ -27,7 +24,6 @@ message Pipe {

message SocketAddress {
enum Protocol {
option (gogoproto.goproto_enum_prefix) = false;
TCP = 0;
// [#not-implemented-hide:]
UDP = 1;
Expand Down
6 changes: 0 additions & 6 deletions api/envoy/api/v2/core/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

import "envoy/type/percent.proto";

option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;

// [#protodoc-title: Common types]

// Identifies location of where either Envoy runs or where upstream hosts run.
Expand Down Expand Up @@ -131,7 +127,6 @@ enum RoutingPriority {

// HTTP request method.
enum RequestMethod {
option (gogoproto.goproto_enum_prefix) = false;
METHOD_UNSPECIFIED = 0;
GET = 1;
HEAD = 2;
Expand Down Expand Up @@ -247,7 +242,6 @@ message SocketOption {
bytes buf_value = 5;
}
enum SocketState {
option (gogoproto.goproto_enum_prefix) = false;
// 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()
Expand Down
8 changes: 2 additions & 6 deletions api/envoy/api/v2/core/config_source.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: Configuration sources]

Expand Down Expand Up @@ -56,11 +53,10 @@ message ApiConfigSource {
repeated GrpcService grpc_services = 4;

// For REST APIs, the delay between successive polls.
google.protobuf.Duration refresh_delay = 3 [(gogoproto.stdduration) = true];
google.protobuf.Duration refresh_delay = 3;

// For REST APIs, the request timeout. If not set, a default value of 1s will be used.
google.protobuf.Duration request_timeout = 5
[(validate.rules).duration.gt.seconds = 0, (gogoproto.stdduration) = true];
google.protobuf.Duration request_timeout = 5 [(validate.rules).duration.gt.seconds = 0];

// For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be
// rate limited.
Expand Down
3 changes: 0 additions & 3 deletions api/envoy/api/v2/core/grpc_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import "google/protobuf/struct.proto";
import "google/protobuf/empty.proto";

import "validate/validate.proto";
import "gogoproto/gogo.proto";

option (gogoproto.equal_all) = true;

// [#protodoc-title: gRPC services]

Expand Down
Loading

0 comments on commit 746d493

Please sign in to comment.