From 01656478f86381c779d908963a8780638a1e14ad Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Tue, 1 Dec 2020 01:59:04 +0000 Subject: [PATCH] http: add Kill Request HTTP filter (#14170) Add a KillRequest HTTP filter which can crash Envoy when receiving a Kill request. It will be used to fault inject kill request to Envoy and measure the blast radius. Risk Level: Low, new feature. Testing: Unit/integration tests. Docs Changes: Added Release Notes: Added Issue: #13978 Signed-off-by: Qin Qin Mirrored from https://github.com/envoyproxy/envoy @ 237b29d6399953f22a47c6e4d19df74b4fbcee8d --- BUILD | 1 + .../filters/http/kill_request/v3/BUILD | 12 ++++++++++ .../http/kill_request/v3/kill_request.proto | 23 +++++++++++++++++++ versioning/BUILD | 1 + 4 files changed, 37 insertions(+) create mode 100644 envoy/extensions/filters/http/kill_request/v3/BUILD create mode 100644 envoy/extensions/filters/http/kill_request/v3/kill_request.proto diff --git a/BUILD b/BUILD index 3df8b906..b918a3c9 100644 --- a/BUILD +++ b/BUILD @@ -190,6 +190,7 @@ proto_library( "//envoy/extensions/filters/http/health_check/v3:pkg", "//envoy/extensions/filters/http/ip_tagging/v3:pkg", "//envoy/extensions/filters/http/jwt_authn/v3:pkg", + "//envoy/extensions/filters/http/kill_request/v3:pkg", "//envoy/extensions/filters/http/local_ratelimit/v3:pkg", "//envoy/extensions/filters/http/lua/v3:pkg", "//envoy/extensions/filters/http/oauth2/v3alpha:pkg", diff --git a/envoy/extensions/filters/http/kill_request/v3/BUILD b/envoy/extensions/filters/http/kill_request/v3/BUILD new file mode 100644 index 00000000..9a76b7e1 --- /dev/null +++ b/envoy/extensions/filters/http/kill_request/v3/BUILD @@ -0,0 +1,12 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/type/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/envoy/extensions/filters/http/kill_request/v3/kill_request.proto b/envoy/extensions/filters/http/kill_request/v3/kill_request.proto new file mode 100644 index 00000000..fd7a3d33 --- /dev/null +++ b/envoy/extensions/filters/http/kill_request/v3/kill_request.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.kill_request.v3; + +import "envoy/type/v3/percent.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.kill_request.v3"; +option java_outer_classname = "KillRequestProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Kill Request] +// Kill Request :ref:`configuration overview `. +// [#extension: envoy.filters.http.kill_request] + +// Configuration for KillRequest filter. +message KillRequest { + // The probability that a Kill request will be triggered. + type.v3.FractionalPercent probability = 1; +} diff --git a/versioning/BUILD b/versioning/BUILD index dc1162bb..efd4715f 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -73,6 +73,7 @@ proto_library( "//envoy/extensions/filters/http/health_check/v3:pkg", "//envoy/extensions/filters/http/ip_tagging/v3:pkg", "//envoy/extensions/filters/http/jwt_authn/v3:pkg", + "//envoy/extensions/filters/http/kill_request/v3:pkg", "//envoy/extensions/filters/http/local_ratelimit/v3:pkg", "//envoy/extensions/filters/http/lua/v3:pkg", "//envoy/extensions/filters/http/oauth2/v3alpha:pkg",