faultInjectionPolicy on Direct Response
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 437
Description
*Title*: faultInjectionPolicy on Direct Response
*Description*:
I have been attempting to configure fault injection on a `direct_response` configuration and it doesn't seem to be valid unless I'm proxying to some kind of upstream even if the upstream is a microservice on localhost. Is this possible? The documentation is very unclear.
Example Configuration:
```yaml
admin:
address:
socket_address: { address: 127.0.0.1, port_value: 15000 }
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 9090 }
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/" }
direct_response:
status: 200
body:
inline_string: "we're good"
- match: { prefix: "/delay/10"}
direct_response:
status: 200
body:
inline_string: "10 second response"
route_action:
faultInjectionPolicy:
delay:
fixedDelay:
seconds: 10
nanos: 0
http_filters:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
- name: extensions.filters.common.fault.v3.FaultDelay
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
```
Contributor guide
Assessment
This issue has not been assessed yet.