From 4f6fd7dc7d79d0ef190e7c16b30b6818c79171eb Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Wed, 11 Mar 2020 17:35:59 +0000 Subject: [PATCH] Expose fault.http.abort.http_status setting via HTTTP header (#10294) The partial implementation of #10254. Adding a support for http header responsible for injecting faults - aborting requests with x-envoy-fault-abort-request HTTP header set. Risk Level: low, new feature. Testing: Added Docs Changes: Added Release Notes: Added Signed-off-by: Rafal Augustyniak Mirrored from https://github.com/envoyproxy/envoy @ 55971b23978b961da71c80b49ddede4c88f24eab --- envoy/config/filter/fault/v2/fault.proto | 4 ++-- envoy/config/filter/http/fault/v2/fault.proto | 9 +++++++++ envoy/extensions/filters/common/fault/v3/fault.proto | 4 ++-- envoy/extensions/filters/http/fault/v3/fault.proto | 11 +++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/envoy/config/filter/fault/v2/fault.proto b/envoy/config/filter/fault/v2/fault.proto index 27f6de73..d0d12c07 100644 --- a/envoy/config/filter/fault/v2/fault.proto +++ b/envoy/config/filter/fault/v2/fault.proto @@ -27,7 +27,7 @@ message FaultDelay { } // Fault delays are controlled via an HTTP header (if applicable). See the - // :ref:`http fault filter ` documentation for + // :ref:`HTTP fault filter ` documentation for // more information. message HeaderDelay { } @@ -65,7 +65,7 @@ message FaultRateLimit { } // Rate limits are controlled via an HTTP header (if applicable). See the - // :ref:`http fault filter ` documentation for + // :ref:`HTTP fault filter ` documentation for // more information. message HeaderLimit { } diff --git a/envoy/config/filter/http/fault/v2/fault.proto b/envoy/config/filter/http/fault/v2/fault.proto index 9465a45e..9ce49288 100644 --- a/envoy/config/filter/http/fault/v2/fault.proto +++ b/envoy/config/filter/http/fault/v2/fault.proto @@ -21,6 +21,12 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filte // [#extension: envoy.filters.http.fault] message FaultAbort { + // Fault aborts are controlled via an HTTP header (if applicable). See the + // :ref:`HTTP fault filter ` documentation for + // more information. + message HeaderAbort { + } + reserved 1; oneof error_type { @@ -28,6 +34,9 @@ message FaultAbort { // HTTP status code to use to abort the HTTP request. uint32 http_status = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; + + // Fault aborts are controlled via an HTTP header (if applicable). + HeaderAbort header_abort = 4; } // The percentage of requests/operations/connections that will be aborted with the error code diff --git a/envoy/extensions/filters/common/fault/v3/fault.proto b/envoy/extensions/filters/common/fault/v3/fault.proto index 14a88f30..9976e17c 100644 --- a/envoy/extensions/filters/common/fault/v3/fault.proto +++ b/envoy/extensions/filters/common/fault/v3/fault.proto @@ -30,7 +30,7 @@ message FaultDelay { } // Fault delays are controlled via an HTTP header (if applicable). See the - // :ref:`http fault filter ` documentation for + // :ref:`HTTP fault filter ` documentation for // more information. message HeaderDelay { option (udpa.annotations.versioning).previous_message_type = @@ -75,7 +75,7 @@ message FaultRateLimit { } // Rate limits are controlled via an HTTP header (if applicable). See the - // :ref:`http fault filter ` documentation for + // :ref:`HTTP fault filter ` documentation for // more information. message HeaderLimit { option (udpa.annotations.versioning).previous_message_type = diff --git a/envoy/extensions/filters/http/fault/v3/fault.proto b/envoy/extensions/filters/http/fault/v3/fault.proto index 91ae0dce..6127ca84 100644 --- a/envoy/extensions/filters/http/fault/v3/fault.proto +++ b/envoy/extensions/filters/http/fault/v3/fault.proto @@ -24,6 +24,14 @@ message FaultAbort { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.fault.v2.FaultAbort"; + // Fault aborts are controlled via an HTTP header (if applicable). See the + // :ref:`HTTP fault filter ` documentation for + // more information. + message HeaderAbort { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.filter.http.fault.v2.FaultAbort.HeaderAbort"; + } + reserved 1; oneof error_type { @@ -31,6 +39,9 @@ message FaultAbort { // HTTP status code to use to abort the HTTP request. uint32 http_status = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; + + // Fault aborts are controlled via an HTTP header (if applicable). + HeaderAbort header_abort = 4; } // The percentage of requests/operations/connections that will be aborted with the error code