Skip to content

Instantly share code, notes, and snippets.

@KrustyHack
Created June 29, 2023 07:49
Show Gist options
  • Save KrustyHack/a5829eb733e39dc196fe8ca47a1dfae1 to your computer and use it in GitHub Desktop.
Save KrustyHack/a5829eb733e39dc196fe8ca47a1dfae1 to your computer and use it in GitHub Desktop.
Envoyer filter for fault injection
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: failure-simulation
namespace: mynamespace
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: 'envoy.filters.network.http_connection_manager'
patch:
operation: INSERT_BEFORE
value:
name: envoy.fault
typed_config:
'@type': 'type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault'
abort:
http_status: 500
percentage:
numerator: 0
denominator: HUNDRED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment