Skip to content

Instantly share code, notes, and snippets.

@christian-posta
Last active January 16, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christian-posta/71ca16fbc32b3067df4025884983fd74 to your computer and use it in GitHub Desktop.
Save christian-posta/71ca16fbc32b3067df4025884983fd74 to your computer and use it in GitHub Desktop.
Blog on decentralized API for API Management
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
name: banking-vs
namespace: gloo-system
spec:
virtualHost:
domains:
- 'banking.api.solo.io'
routes:
- matchers:
- prefix: /api/riskscreen
delegateAction:
name: riskscreen-routes
namespace: default
- matchers:
- prefix: /
directResponseAction:
status: 405
body: '{"error": "do not do this"}'
options:
extauth:
configRef:
name: auth0-oidc
namespace: gloo-system
apiVersion: gateway.solo.io/v1
kind: RouteTable
metadata:
name: riskscreen-routes
namespace: default
spec:
routes:
- matchers:
- exact: /api/riskscreen/check
routeAction:
single:
upstream:
name: default-echo-server-8080
namespace: gloo-system
options:
transformations:
requestTransformation:
transformationTemplate:
body:
text: '{"foo": "bar"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment