##################################################################################
# A basic service mesh for internal linkerd config. This config contains an #
# outgoing router that proxies requests from local applications to the linkerd #
# running on the destination host and an incoming router that reverse-proxies #
# incoming requests to the application instance running on the local host. #
##################################################################################
admin:
port: 9990
namers:
- kind: io.l5d.consul
host: 127.0.0.1
port: 8500
includeTag: false
setHost: false
- kind: io.l5d.rewrite
prefix: /srv
pattern: "/{service}"
name: “/srv/{service}"
routers:
- protocol: http
identifier:
kind: io.l5d.path
segments: 1
label: routerA_outgoing
dtab: |
/srv => /#/io.l5d.consul/dc;
/svc => /#/srv;
httpAccessLog: /alloc/logs/access_routerA.log
servers:
- port: 8080
ip: 0.0.0.0
- protocol: http
label: outgoing
dtab: |
/consul => /#/io.l5d.consul/dc;
/svc => /$/io.buoyant.http.subdomainOfPfx/svc.consul/consul;
httpAccessLog: /alloc/logs/access_outgoing.log
servers:
- port: 80
ip: 0.0.0.0
interpreter:
kind: default
transformers:
# Instead of sending the request directly to the destination, send it to
# the linkerd (listening on port 81) running on the destination host.
- kind: io.l5d.port
port: 81
- protocol: http
label: incoming
dtab: |
/consul => /#/io.l5d.consul/dc;
/svc => /$/io.buoyant.http.subdomainOfPfx/svc.consul/consul;
servers:
- port: 81
ip: 0.0.0.0
interpreter:
kind: default
transformers:
# Instead of sending the request to a random destination instance, send it
# only to instances running on localhost.
- kind: io.l5d.localhost
telemetry:
- kind: io.l5d.recentRequests
sampleRate: 1.0
- kind: io.l5d.prometheus
usage:
enabled: false