Skip to content

Instantly share code, notes, and snippets.

@tommeramber
Last active May 29, 2022 06:13
Show Gist options
  • Save tommeramber/d7701f9e5340f8470eb0475eada0e6cf to your computer and use it in GitHub Desktop.
Save tommeramber/d7701f9e5340f8470eb0475eada0e6cf to your computer and use it in GitHub Desktop.
Demo - Meetup - Fault Injection with Service Mesh
oc apply -f ./config/istio/destinationrules-all.yaml
oc apply -f ./config/istio/virtual-services-default.yaml
oc apply -f ./config/istio/virtual-service-userprofile-50-50.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: boards
spec:
hosts:
- boards
http:
- fault:
delay:
fixedDelay: 5s
percentage:
value: 50
route:
- destination:
host: boards
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: userprofile
spec:
hosts:
- userprofile
http:
- fault:
abort:
httpStatus: 503
percentage:
value: 100
route:
- destination:
host: userprofile
subset: v1
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: userprofile
spec:
hosts:
- userprofile
http:
- fault:
abort:
httpStatus: 503
percentage:
value: 50
route:
- destination:
host: userprofile
subset: v1
weight: 50
- destination:
host: userprofile
subset: v3
weight: 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment