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

Sync Fork from Upstream Repo #6

Merged
merged 14 commits into from
Aug 20, 2019
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
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ startup --host_jvm_args=-Xmx2g
build --workspace_status_command=bazel/get_workspace_status
build --experimental_remap_main_repo
build --experimental_local_memory_estimate
build --experimental_strict_action_env=true
build --host_force_python=PY2
build --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
build --action_env=BAZEL_LINKOPTS=-lm:-static-libgcc
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ extensions/filters/common/original_src @snowp @klarose
/*/extensions/filters/http/adaptive_concurrency @tonya11en @mattklein123
# http inspector
/*/extensions/filters/listener/http_inspector @crazyxy @PiotrSikora @lizan
# attribute context
/*/extensions/filters/common/expr @kyessenov @yangminzhu
7 changes: 4 additions & 3 deletions api/bazel/api_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ def _LibrarySuffix(library_name, suffix):
# TODO(htuch): Convert this to native py_proto_library once
# https://github.com/bazelbuild/bazel/issues/3935 and/or
# https://github.com/bazelbuild/bazel/issues/2626 are resolved.
def api_py_proto_library(name, srcs = [], deps = [], has_services = 0):
def api_py_proto_library(name, srcs = [], deps = [], external_py_proto_deps = [], has_services = 0):
_py_proto_library(
name = _Suffix(name, _PY_SUFFIX),
srcs = srcs,
default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@com_google_protobuf//:protoc",
deps = [_LibrarySuffix(d, _PY_SUFFIX) for d in deps] + [
deps = [_LibrarySuffix(d, _PY_SUFFIX) for d in deps] + external_py_proto_deps + [
"@com_envoyproxy_protoc_gen_validate//validate:validate_py",
"@com_google_googleapis//google/rpc:status_py_proto",
"@com_google_googleapis//google/api:annotations_py_proto",
Expand Down Expand Up @@ -116,6 +116,7 @@ def api_proto_library(
deps = [],
external_proto_deps = [],
external_cc_proto_deps = [],
external_py_proto_deps = [],
has_services = 0,
linkstatic = None,
require_py = 1):
Expand Down Expand Up @@ -152,7 +153,7 @@ def api_proto_library(
)
py_export_suffixes = []
if (require_py == 1):
api_py_proto_library(name, srcs, deps, has_services)
api_py_proto_library(name, srcs, deps, external_py_proto_deps, has_services)
py_export_suffixes = ["_py", "_py_genproto"]

# Allow unlimited visibility for consumers
Expand Down
7 changes: 5 additions & 2 deletions api/envoy/admin/v2alpha/server_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ message CommandLineOptions {
// See :option:`--config-yaml` for details.
string config_yaml = 4;

// See :option:`--allow-unknown-fields` for details.
bool allow_unknown_fields = 5;
// See :option:`--allow-unknown-static-fields` for details.
bool allow_unknown_static_fields = 5;

// See :option:`--reject-unknown-dynamic-fields` for details.
bool reject_unknown_dynamic_fields = 26;

// See :option:`--admin-address-path` for details.
string admin_address_path = 6;
Expand Down
3 changes: 2 additions & 1 deletion api/envoy/api/v2/route/route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ message RouteAction {

// Specifies the upstream timeout for the route. If not specified, the default is 15s. This
// spans between the point at which the entire downstream request (i.e. end-of-stream) has been
// processed and when the upstream response has been completely processed.
// processed and when the upstream response has been completely processed. A value of 0 will
// disable the route's timeout.
//
// .. note::
//
Expand Down
14 changes: 14 additions & 0 deletions api/envoy/config/filter/http/ext_authz/v2/ext_authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@ message ExtAuthz {
// Sets the HTTP status that is returned to the client when there is a network error between the
// filter and the authorization server. The default status is HTTP 403 Forbidden.
envoy.type.HttpStatus status_on_error = 7;

// Specifies a list of metadata namespaces whose values, if present, will be passed to the
// ext_authz service as an opaque *protobuf::Struct*.
//
// For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata
// <envoy_api_field_config.filter.http.jwt_authn.v2alpha.JwtProvider.payload_in_metadata>` is set,
// then the following will pass the jwt payload to the authorization server.
//
// .. code-block:: yaml
//
// metadata_context_namespaces:
// - envoy.filters.http.jwt_authn
//
repeated string metadata_context_namespaces = 8;
}

// Configuration for buffering the request data.
Expand Down
25 changes: 24 additions & 1 deletion api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,29 @@ message RedisProxy {
// this limit, then redirection will fail and the original redirection error will be passed
// downstream unchanged. This limit defaults to 100.
google.protobuf.UInt32Value max_upstream_unknown_connections = 6;

// ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently
// supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data
// because replication is asynchronous and requires some delay. You need to ensure that your
// application can tolerate stale data.
enum ReadPolicy {
// Default mode. Read from the current master node.
MASTER = 0;
// Read from the master, but if it is unavailable, read from replica nodes.
PREFER_MASTER = 1;
// Read from replica nodes. If multiple replica nodes are present within a shard, a random
// node is selected. Healthy nodes have precedent over unhealthy nodes.
REPLICA = 2;
// Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not
// present or unhealthy), read from the master.
PREFER_REPLICA = 3;
// Read from any node of the cluster. A random node is selected among the master and replicas,
// healthy nodes have precedent over unhealthy nodes.
ANY = 4;
}

// Read policy. The default is to read from the master.
ReadPolicy read_policy = 7 [(validate.rules).enum.defined_only = true];
}

// Network settings for the connection pool to the upstream clusters.
Expand Down Expand Up @@ -210,4 +233,4 @@ message RedisProtocolOptions {
// Upstream server password as defined by the `requirepass directive
// <https://redis.io/topics/config>`_ in the server's configuration file.
envoy.api.v2.core.DataSource auth_password = 1;
}
}
10 changes: 10 additions & 0 deletions api/envoy/config/rbac/v2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_go_proto_library", "api_prot
api_proto_library_internal(
name = "rbac",
srcs = ["rbac.proto"],
external_cc_proto_deps = [
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
],
external_proto_deps = [
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto",
],
external_py_proto_deps = [
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_py_proto",
],
visibility = ["//visibility:public"],
deps = [
"//envoy/api/v2/core:address",
Expand All @@ -22,5 +31,6 @@ api_go_proto_library(
"//envoy/api/v2/route:route_go_proto",
"//envoy/type/matcher:metadata_go_proto",
"//envoy/type/matcher:string_go_proto",
"@com_google_googleapis//google/api/expr/v1alpha1:cel_go_proto",
],
)
8 changes: 7 additions & 1 deletion api/envoy/config/rbac/v2/rbac.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import "envoy/api/v2/route/route.proto";
import "envoy/type/matcher/metadata.proto";
import "envoy/type/matcher/string.proto";

import "google/api/expr/v1alpha1/syntax.proto";

package envoy.config.rbac.v2;

option java_outer_classname = "RbacProto";
Expand Down Expand Up @@ -81,7 +83,7 @@ message RBAC {

// Policy specifies a role and the principals that are assigned/denied the role. A policy matches if
// and only if at least one of its permissions match the action taking place AND at least one of its
// principals match the downstream.
// principals match the downstream AND the condition is true if specified.
message Policy {
// Required. The set of permissions that define a role. Each permission is matched with OR
// semantics. To match all actions for this policy, a single Permission with the `any` field set
Expand All @@ -92,6 +94,10 @@ message Policy {
// principal is matched with OR semantics. To match all downstreams for this policy, a single
// Principal with the `any` field set to true should be used.
repeated Principal principals = 2 [(validate.rules).repeated .min_items = 1];

// An optional symbolic expression specifying an access control condition.
// The condition is combined with AND semantics.
google.api.expr.v1alpha1.Expr condition = 3;
}

// Permission defines an action (or actions) that a principal can take.
Expand Down
4 changes: 4 additions & 0 deletions api/envoy/service/auth/v2/attribute_context.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.service.auth.v2";

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

import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto";
Expand Down Expand Up @@ -135,6 +136,9 @@ message AttributeContext {
// information to the auth server without modifying the proto definition. It maps to the
// internal opaque context in the filter chain.
map<string, string> context_extensions = 10;

// Dynamic metadata associated with the request.
envoy.api.v2.core.Metadata metadata_context = 11;
}

// The following items are left out of this proto
Expand Down
26 changes: 25 additions & 1 deletion bazel/dependency_imports.bzl
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@envoy//bazel/toolchains:rbe_toolchains_config.bzl", "rbe_toolchains_config")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

# go version for rules_go
GO_VERSION = "1.12.5"
GO_VERSION = "1.12.8"

def envoy_dependency_imports(go_version = GO_VERSION):
rules_foreign_cc_dependencies()
go_rules_dependencies()
go_register_toolchains(go_version)
rbe_toolchains_config()
gazelle_dependencies()

go_repository(
name = "org_golang_google_grpc",
build_file_proto_mode = "disable",
importpath = "google.golang.org/grpc",
sum = "h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A=",
version = "v1.23.0",
)

go_repository(
name = "org_golang_x_net",
importpath = "golang.org/x/net",
sum = "h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA=",
version = "v0.0.0-20190813141303-74dc4d7220e7",
)

go_repository(
name = "org_golang_x_text",
importpath = "golang.org/x/text",
sum = "h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=",
version = "v0.3.0",
)
5 changes: 5 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def envoy_dependencies(skip_targets = []):
_com_lightstep_tracer_cpp()
_io_opentracing_cpp()
_net_zlib()
_repository_impl("com_googlesource_code_re2")
_com_google_cel_cpp()
_repository_impl("bazel_toolchains")

_python_deps()
Expand Down Expand Up @@ -315,6 +317,9 @@ def _net_zlib():
actual = "@envoy//bazel/foreign_cc:zlib",
)

def _com_google_cel_cpp():
_repository_impl("com_google_cel_cpp")

def _com_github_nghttp2_nghttp2():
location = REPOSITORY_LOCATIONS["com_github_nghttp2_nghttp2"]
http_archive(
Expand Down
45 changes: 27 additions & 18 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz"],
),
bazel_toolchains = dict(
sha256 = "0710ec5a88201c4c3038ea458f7e9078cc3ad7ad61736ab287c115438eb91b1d",
strip_prefix = "bazel-toolchains-5a8611ee011d0d68498b16bf42a9c69d139bc708",
# 2019-08-01
# Need:
# - https://github.com/bazelbuild/bazel-toolchains/pull/644 to select correct toolchain from same image
# - https://github.com/bazelbuild/bazel-toolchains/pull/650 to support no java config
# TODO(lizan): Update to release when new version is released.
urls = ["https://github.com/bazelbuild/bazel-toolchains/archive/5a8611ee011d0d68498b16bf42a9c69d139bc708.tar.gz"],
sha256 = "b72e7a911436b2900b05759a1fcd735070edbd4442f0a3506ef021fdcd6e15b3",
strip_prefix = "bazel-toolchains-0.28.5",
urls = ["https://github.com/bazelbuild/bazel-toolchains/archive/0.28.5.tar.gz"],
),
boringssl = dict(
# Use commits from branch "chromium-stable-with-bazel"
sha256 = "18edf961f8377e8d10fd8497bc8a331def9cb60a6c2a50a4c8eb322b045042d5",
strip_prefix = "boringssl-87d1c8f292e5184fd727efe84f458d89687d7742",
# chromium-76.0.3809.87
urls = ["https://github.com/google/boringssl/archive/87d1c8f292e5184fd727efe84f458d89687d7742.tar.gz"],
sha256 = "c712766ddc844de2a38e686e1cdd7288795e9a6fe7f699c6636f1b76703db84e",
strip_prefix = "boringssl-265728decec4370cd02b941f72fba9f0735e2923",
# To update BoringSSL, which tracks Chromium releases:
# 1. Open https://omahaproxy.appspot.com/ and note <current_version> of linux/beta release.
# 2. Open https://chromium.googlesource.com/chromium/src/+/refs/tags/<current_version>/DEPS and note <boringssl_revision>.
# 3. Find a commit in BoringSSL's "master-with-bazel" branch that merges <boringssl_revision>.
#
# chromium-77.0.3865.35 (BETA)
urls = ["https://github.com/google/boringssl/archive/265728decec4370cd02b941f72fba9f0735e2923.tar.gz"],
),
boringssl_fips = dict(
sha256 = "b12ad676ee533824f698741bd127f6fbc82c46344398a6d78d25e62c6c418c73",
Expand Down Expand Up @@ -219,8 +218,8 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/grpc-ecosystem/grpc-httpjson-transcoding/archive/64d6ac985360b624d8e95105701b64a3814794cd.tar.gz"],
),
io_bazel_rules_go = dict(
sha256 = "a82a352bffae6bee4e95f68a8d80a70e87f42c4741e6a448bec11998fcc82329",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.18.5/rules_go-0.18.5.tar.gz"],
sha256 = "96b1f81de5acc7658e1f5a86d7dc9e1b89bc935d83799b711363a748652c471a",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.19.2/rules_go-0.19.2.tar.gz"],
),
rules_foreign_cc = dict(
sha256 = "c957e6663094a1478c43330c1bbfa71afeaf1ab86b7565233783301240c7a0ab",
Expand All @@ -239,13 +238,23 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/census-instrumentation/opencensus-cpp/archive/cad0d03ff3474cf14389fc249e16847ab7b6895f.tar.gz"],
),
com_github_curl = dict(
sha256 = "821aeb78421375f70e55381c9ad2474bf279fc454b791b7e95fc83562951c690",
strip_prefix = "curl-7.65.1",
urls = ["https://github.com/curl/curl/releases/download/curl-7_65_1/curl-7.65.1.tar.gz"],
sha256 = "4376ac72b95572fb6c4fbffefb97c7ea0dd083e1974c0e44cd7e49396f454839",
strip_prefix = "curl-7.65.3",
urls = ["https://github.com/curl/curl/releases/download/curl-7_65_3/curl-7.65.3.tar.gz"],
),
com_googlesource_quiche = dict(
# Static snapshot of https://quiche.googlesource.com/quiche/+archive/2a930469533c3b541443488a629fe25cd8ff53d0.tar.gz
sha256 = "fcdebf54c89d839ffa7eefae166c8e4b551c765559db13ff15bff98047f344fb",
urls = ["https://storage.googleapis.com/quiche-envoy-integration/2a930469533c3b541443488a629fe25cd8ff53d0.tar.gz"],
),
com_google_cel_cpp = dict(
sha256 = "f027c551d57d38fb9f0b5e4f21a2b0b8663987119e23b1fd8dfcc7588e9a2350",
strip_prefix = "cel-cpp-d9d02b20ab85da2444dbdd03410bac6822141364",
urls = ["https://github.com/google/cel-cpp/archive/d9d02b20ab85da2444dbdd03410bac6822141364.tar.gz"],
),
com_googlesource_code_re2 = dict(
sha256 = "f31db9cd224d018a7e4fe88ef84aaa874b0b3ed91d4d98ee5a1531101d3fdc64",
strip_prefix = "re2-87e2ad45e7b18738e1551474f7ee5886ff572059",
urls = ["https://github.com/google/re2/archive/87e2ad45e7b18738e1551474f7ee5886ff572059.tar.gz"],
),
)
4 changes: 2 additions & 2 deletions ci/build_container/build_container_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if [[ "$(uname -m)" == "x86_64" ]]; then
&& chmod +x /usr/local/bin/buildifier

# bazelisk
VERSION=0.0.8
SHA256=5fced4fec06bf24beb631837fa9497b6698f34041463d9188610dfa7b91f4f8d
VERSION=1.0
SHA256=820f1432bb729cf1d51697a64ce57c0cff7ea4013acaf871b8c24b6388174d0d
curl --location --output /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v${VERSION}/bazelisk-linux-amd64 \
&& echo "$SHA256 /usr/local/bin/bazel" | sha256sum --check \
&& chmod +x /usr/local/bin/bazel
Expand Down
4 changes: 2 additions & 2 deletions ci/verify_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ cd ../

# Test grpc bridge example
# install go
curl -O https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz
tar -xf go1.7.1.linux-amd64.tar.gz
curl -O https://storage.googleapis.com/golang/go1.12.8.linux-amd64.tar.gz
tar -xf go1.12.8.linux-amd64.tar.gz
sudo mv go /usr/local
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
Expand Down
26 changes: 13 additions & 13 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
GitPython==2.0.8
GitPython==3.0.0
Jinja2==2.10.1
MarkupSafe==1.1.1
Pygments==2.2.0
alabaster==0.7.10
babel==2.4.0
docutils==0.14
Pygments==2.4.2
alabaster==0.7.12
babel==2.7.0
docutils==0.15.2
gitdb==0.6.4
imagesize==0.7.1
pytz==2017.2
requests>=2.20.0
six==1.10.0
imagesize==1.1.0
pytz==2019.2
requests>=2.22.0
six==1.12.0
smmap==0.9.0
snowballstemmer==1.2.1
sphinx==1.8.1
sphinxcontrib-httpdomain==1.6.1
sphinx_rtd_theme==0.4.2
snowballstemmer==1.9.0
sphinx==2.1.2
sphinxcontrib-httpdomain==1.7.0
sphinx_rtd_theme==0.4.3
4 changes: 4 additions & 0 deletions docs/root/configuration/statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Statistics
==========

.. _server_statistics:

Server
------

Expand All @@ -25,6 +27,8 @@ Server related statistics are rooted at *server.* with following statistics:
hot_restart_epoch, Gauge, Current hot restart epoch
initialization_time_ms, Histogram, Total time taken for Envoy initialization in milliseconds. This is the time from server start-up until the worker threads are ready to accept new connections
debug_assertion_failures, Counter, Number of debug assertion failures detected in a release build if compiled with `--define log_debug_assert_in_release=enabled` or zero otherwise
static_unknown_fields, Counter, Number of messages in static configuration with unknown fields
dynamic_unknown_fields, Counter, Number of messages in dynamic configuration with unknown fields

File system
-----------
Expand Down
Loading