FaultInjectionPolicy
FaultInjectionPolicy API reference.
Proto: fault_injection_policy.proto
Package: resilience.policy.gloo.solo.io
Types:
- FaultInjectionPolicyReport
- FaultInjectionPolicyReport.WorkspacesEntry
- FaultInjectionPolicySpec
- FaultInjectionPolicySpec.Config
- FaultInjectionPolicySpec.Config.Abort
- FaultInjectionPolicySpec.Config.Delay
- FaultInjectionPolicyStatus
FaultInjectionPolicyReport
Field | Description |
---|---|
workspaces | (repeated FaultInjectionPolicyReport.WorkspacesEntry )The state of the resource in each workspace that receives its configuration. |
selectedRoutes | (repeated common.gloo.solo.io.RouteReference )A list of references to all routes selected by the policy. |
FaultInjectionPolicyReport.WorkspacesEntry
Field | Description |
---|---|
key | (string ) |
value | (common.gloo.solo.io.Report ) |
FaultInjectionPolicySpec
FaultInjectionPolicy is used to inject faults (latency and errors) into requests sent through the mesh. Fault specification is part of a VirtualService rule. Faults include aborting the Http request from downstream service, and/or delaying proxying of requests. A fault rule MUST HAVE delay or abort or both. FaultInjectionPolicies are applied at the Route level.
Field | Description |
---|---|
applyToRoutes | (repeated common.gloo.solo.io.RouteSelector )select the routes where the policy will be applied if left empty, will apply to all routes in the workspace. |
config | (FaultInjectionPolicySpec.Config )The details of the fault injection policy to apply to the selected routes. |
FaultInjectionPolicySpec.Config
Note:* Delay and abort faults are independent of one another, even if both are specified simultaneously.
Field | Description |
---|---|
delay | (FaultInjectionPolicySpec.Config.Delay )Indicate the amount of delay in seconds. The optional percentage field can be used to only delay a certain percentage of requests. If left unspecified, all request will be delayed. |
abort | (FaultInjectionPolicySpec.Config.Abort )Abort the request and return the specified error code back to traffic source. |
FaultInjectionPolicySpec.Config.Abort
Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty.
Field | Description |
---|---|
httpStatus | (int32 )Required. HTTP status code to use to abort the request. |
percentage | (google.protobuf.DoubleValue )Percentage of requests to be aborted. Values range between 0 and 100. If omitted all requests will be aborted. For information about the value format, see the Google protocol buffer documentation. |
FaultInjectionPolicySpec.Config.Delay
Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc.
Field | Description |
---|---|
fixedDelay | (google.protobuf.Duration )Required. Add a delay of a fixed duration before sending the request. Format: 1h /1m /1s /1ms . MUST be >=1ms. For information about the value format, see the Google protocol buffer documentation. |
percentage | (google.protobuf.DoubleValue )Percentage of requests on which the delay will be injected. Values range between 0 and 100. If omitted all requests will be delayed. For information about the value format, see the Google protocol buffer documentation. |
FaultInjectionPolicyStatus
reflects the status of the FaultInjectionPolicy
Field | Description |
---|---|
common | (common.gloo.solo.io.Status )The common status of the object |
numSelectedRoutes | (uint32 )The number of routes selected by the policy. |