actionfault

add_abort_fault

Abort requests early by the virtual service identified by `name`

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaosistio.fault.actions
Nameadd_abort_fault
Returnmapping

Usage

JSON

{
  "name": "add-abort-fault",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosistio.fault.actions",
    "func": "add_abort_fault",
    "arguments": {
      "virtual_service_name": "",
      "http_status": 0,
      "routes": []
    }
  }
}

YAML

name: add-abort-fault
provider:
  arguments:
    http_status: 0
    routes: []
    virtual_service_name: ""
  func: add_abort_fault
  module: chaosistio.fault.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
virtual_service_namestringYesVirtual Service NameName of the target virtual service
nsstring“default”NoNamespace
versionstring“networking.istio.io/v1alpha3”NoVersionIstio fault injection version
http_statusinteger404YesStatusHTTP status to set on responses
percentagefloat30.0NoVolumePercentage of requests impacted by the fault

See https://istio.io/docs/reference/config/istio.networking.v1alpha3/#HTTPFaultInjection-Abort

Signature

def add_abort_fault(
        virtual_service_name: str,
        http_status: int,
        routes: List[Dict[str, str]],
        percentage: float = None,
        ns: str = 'default',
        version: str = 'networking.istio.io/v1alpha3',
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass