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 <raugustyniak@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 55971b23978b961da71c80b49ddede4c88f24eab
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 11a576ae74
commit 4f6fd7dc7d
  1. 4
      envoy/config/filter/fault/v2/fault.proto
  2. 9
      envoy/config/filter/http/fault/v2/fault.proto
  3. 4
      envoy/extensions/filters/common/fault/v3/fault.proto
  4. 11
      envoy/extensions/filters/http/fault/v3/fault.proto

@ -27,7 +27,7 @@ message FaultDelay {
}
// Fault delays are controlled via an HTTP header (if applicable). See the
// :ref:`http fault filter <config_http_filters_fault_injection_http_header>` documentation for
// :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` 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 <config_http_filters_fault_injection_http_header>` documentation for
// :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` documentation for
// more information.
message HeaderLimit {
}

@ -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 <config_http_filters_fault_injection_http_header>` 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

@ -30,7 +30,7 @@ message FaultDelay {
}
// Fault delays are controlled via an HTTP header (if applicable). See the
// :ref:`http fault filter <config_http_filters_fault_injection_http_header>` documentation for
// :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` 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 <config_http_filters_fault_injection_http_header>` documentation for
// :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` documentation for
// more information.
message HeaderLimit {
option (udpa.annotations.versioning).previous_message_type =

@ -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 <config_http_filters_fault_injection_http_header>` 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

Loading…
Cancel
Save