Fault Injection

    On Universal:

    On Kubernetes:

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

    FaultInjection policy available only for L7 HTTP traffic, protocol: http is mandatory tag both for source and 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 of requests on which response bandwidth limit will be injected, has to be in [0.0 - 100.0] range