Experiment editor showing the haproxy ingress block traffic action
Introduction
You can use the haproxy ingress block traffic action to block all traffic to specific HTTP path / HTTP Method / HTTP Headers in the ingress controller and give back specific http status. This is useful for testing how your application behaves when specific endpoints are not reachable.
Use Cases
Understand how your services behave under network outages
Usage
You can apply multiple actions to the same ingress resource.
Rollback
The annotation made to the ingress resource will be removed automatically after the action is finished. If you want to rollback manually, you can look for the annotation haproxy-ingress.github.io/backend-config-snippet in the ingress resource and remove the parts that are surrounded by # BEGIN STEADYBIT - and # END STEADYBIT -. The steadybit parts in the annotation will be removed automatically after the action is finished.
Parameters
Path Pattern, HTTP Method, and HTTP Headers are optional parameters. If you do not set them, nothing will be blocked. If you set them, all requests that match the path pattern, HTTP method, and HTTP headers will be blocked.
Name
Required
Description
Duration
true
How long should the traffic be affected?
Status Code
true
The HTTP status code to return when the path is blocked.
Path Pattern
false
A regex pattern to match the paths to block.
HTTP Method
false
A http method to match the requests to block. * is used as not set.
HTTP Headers
false
A list of HTTP headers to match the requests to block. Value is a regex pattern. If multiple headers are set, all of them must match.