Fault Injection

    On Universal:

    On Kubernetes:

    1. apiVersion: kuma.io/v1alpha1
    2. kind: FaultInjection
    3. mesh: default
    4. metadata:
    5. name: fi1
    6. sources:
    7. - match:
    8. kuma.io/service: frontend
    9. version: "0.1"
    10. kuma.io/protocol: http
    11. - match:
    12. kuma.io/service: backend
    13. kuma.io/protocol: http
    14. conf:
    15. abort:
    16. percentage: 50
    17. delay:
    18. percentage: 50.5
    19. value: 5s
    20. responseBandwidth:
    21. percentage: 50

    FaultInjection policy available only for L7 HTTP traffic, kuma.io/protocol: http is mandatory tag both for the destination selector.

    HTTP Faults

    At least one of the following Faults should be specified.

    Abort

    • httpStatus - HTTP status code which will be returned to source side
    • percentage - percentage of requests on which abort will be injected, has to be in [0.0 - 100.0] range

    Delay

    Delay defines configuration of delaying a response from a destination.

    • value - the duration during which the response will be delayed
    • percentage - percentage of requests on which delay will be injected, has to be in [0.0 - 100.0] range

    ResponseBandwidth limit

    ResponseBandwidth defines a configuration to limit the speed of responding to the requests.

    • percentage - percentage of requests on which response bandwidth limit will be injected, has to be in [0.0 - 100.0] range