Search code examples
istio

Istio fault injection


Istio supports fault injecting.

The example is using destination. Is there any way for me to use source in order to inject fault to downstream services?


Solution

  • I would suggest using sourceLabels with internal mesh gateway.
    Example:

    gateways:
      - mesh
      http:
      - match:
        - sourceLabels:
            app: source-app-v1
    

    read HTTPMatchRequest for more.


    Unfortunately, there is no straightforward way to achieve what you looking for.

    route.destination.host is a required field for HTTPFaultInjection, and it has to be unique [source], and unambiguously refer to a service in the service registry [source], so it cannot be wildcarded (with * for example).