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

add: router check tool #1

Closed
wants to merge 3 commits into from
Closed
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
16 changes: 16 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load(
"@envoy//bazel:envoy_build_system.bzl",
"envoy_cc_binary",
"envoy_cc_test_binary",
)

# Copyright 2016 Istio Authors. All Rights Reserved.
Expand Down Expand Up @@ -54,3 +55,18 @@ pkg_tar(
package_dir = "/usr/local/bin/",
tags = ["manual"],
)

envoy_cc_test_binary(
name = "router_check_tool",
repository = "@envoy",
srcs = [
"@envoy//test/tools/router_check:router_check.cc",
],
deps = ISTIO_EXTENSIONS + [
"@envoy//test/tools/router_check:router_check_main_lib",
"@envoy//source/extensions/retry/host/previous_hosts:config",
"@envoy//source/extensions/retry/host/omit_canary_hosts:config",
"@envoy//source/extensions/retry/host/omit_host_metadata:config",
"@envoy//source/extensions/filters/http/fault:config",
],
)
2 changes: 2 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ http_archive(
sha256 = ENVOY_SHA256,
strip_prefix = ENVOY_REPO + "-" + ENVOY_SHA,
url = "https://github.com/" + ENVOY_ORG + "/" + ENVOY_REPO + "/archive/" + ENVOY_SHA + ".tar.gz",
patches = ["router_check.patch"],
patch_args = ["-p1"],
)

load("@envoy//bazel:api_binding.bzl", "envoy_api_binding")
Expand Down
14 changes: 14 additions & 0 deletions external/router_check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/test/tools/router_check/router.cc b/test/tools/router_check/router.cc
index 410caf6cc0..84c9670d77 100644
--- a/test/tools/router_check/router.cc
+++ b/test/tools/router_check/router.cc
@@ -137,6 +137,9 @@ RouterCheckTool RouterCheckTool::create(const std::string& router_config_file,
assignRuntimeFraction(route_config);
auto factory_context =
std::make_unique<NiceMock<Server::Configuration::MockServerFactoryContext>>();
+
+ Runtime::maybeSetDeprecatedInts("re2.max_program_size.error_level", 32768); // istio-proxy default
+
auto config = *Router::ConfigImpl::create(route_config, *factory_context,
ProtobufMessage::getNullValidationVisitor(), false);
if (!disable_deprecation_check) {
15 changes: 15 additions & 0 deletions router-check-tool/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM gcr.io/istio-testing/build-tools-proxy:master-latest as builder

WORKDIR /work/

COPY . /work/

RUN bazel build //:router_check_tool

FROM ubuntu

COPY --from=builder /work/bazel-bin/router_check_tool /usr/local/bin/

USER nobody:nogroup

ENTRYPOINT [ "/usr/local/bin/router_check_tool"]
Loading