diff --git a/envoy/config/filter/fault/v2/fault.proto b/envoy/config/filter/fault/v2/fault.proto index 89d1dc2c..f27f9d44 100644 --- a/envoy/config/filter/fault/v2/fault.proto +++ b/envoy/config/filter/fault/v2/fault.proto @@ -19,19 +19,25 @@ import "gogoproto/gogo.proto"; // Delay specification is used to inject latency into the // HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections. message FaultDelay { + // Fault delays are controlled via an HTTP header (if applicable). See the + // :ref:`http fault filter ` documentation for + // more information. + message HeaderDelay { + } + enum FaultDelayType { - // Fixed delay (step function). + // Unused and deprecated. FIXED = 0; } - // Delay type to use (fixed|exponential|..). Currently, only fixed delay (step function) is - // supported. - FaultDelayType type = 1 [(validate.rules).enum.defined_only = true]; + // Unused and deprecated. Will be removed in the next release. + FaultDelayType type = 1 [deprecated = true]; reserved 2; oneof fault_delay_secifier { option (validate.required) = true; + // Add a fixed delay before forwarding the operation upstream. See // https://developers.google.com/protocol-buffers/docs/proto3#json for // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified @@ -40,6 +46,9 @@ message FaultDelay { // for the specified period. This is required if type is FIXED. google.protobuf.Duration fixed_delay = 3 [(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true]; + + // Fault delays are controlled via an HTTP header (if applicable). + HeaderDelay header_delay = 5; } // The percentage of operations/connections/requests on which the delay will be injected. @@ -54,11 +63,20 @@ message FaultRateLimit { uint64 limit_kbps = 1 [(validate.rules).uint64.gte = 1]; } + // Rate limits are controlled via an HTTP header (if applicable). See the + // :ref:`http fault filter ` documentation for + // more information. + message HeaderLimit { + } + oneof limit_type { option (validate.required) = true; // A fixed rate limit. FixedLimit fixed_limit = 1; + + // Rate limits are controlled via an HTTP header (if applicable). + HeaderLimit header_limit = 3; } // The percentage of operations/connections/requests on which the rate limit will be injected. diff --git a/envoy/config/filter/http/fault/v2/fault.proto b/envoy/config/filter/http/fault/v2/fault.proto index df425896..bc491580 100644 --- a/envoy/config/filter/http/fault/v2/fault.proto +++ b/envoy/config/filter/http/fault/v2/fault.proto @@ -80,7 +80,9 @@ message HTTPFault { // amount due to the implementation details. google.protobuf.UInt32Value max_active_faults = 6; - // The response rate limit to be applied to the response body of the stream. + // The response rate limit to be applied to the response body of the stream. When configured, + // the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent + // ` runtime key. // // .. attention:: // This is a per-stream limit versus a connection level limit. This means that concurrent streams