2019-04-09 15:24:05 +00:00
|
|
|
[global]
|
|
|
|
checkNewVersion = false
|
|
|
|
sendAnonymousUsage = false
|
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[log]
|
2019-04-16 13:30:09 +00:00
|
|
|
level = "DEBUG"
|
2018-11-27 16:42:04 +00:00
|
|
|
|
2018-01-24 10:57:06 +00:00
|
|
|
[api]
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2019-04-15 09:14:05 +00:00
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.web]
|
2018-01-10 16:48:04 +00:00
|
|
|
address = ":8000"
|
|
|
|
|
|
|
|
[tracing]
|
2018-04-11 14:30:04 +00:00
|
|
|
backend = "{{.TracingBackend}}"
|
|
|
|
servicename = "tracing"
|
2018-01-10 16:48:04 +00:00
|
|
|
[tracing.zipkin]
|
2018-04-11 14:30:04 +00:00
|
|
|
httpEndpoint = "http://{{.ZipkinIP}}:9411/api/v1/spans"
|
|
|
|
debug = true
|
2018-01-10 16:48:04 +00:00
|
|
|
[tracing.jaeger]
|
2018-04-11 14:30:04 +00:00
|
|
|
samplingType = "const"
|
|
|
|
samplingParam = 1.0
|
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[providers]
|
|
|
|
[providers.file]
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers]
|
|
|
|
[http.routers.router1]
|
2018-11-14 09:18:03 +00:00
|
|
|
Service = "service1"
|
|
|
|
Middlewares = ["retry", "ratelimit"]
|
2019-01-30 15:24:07 +00:00
|
|
|
Rule = "Path(`/ratelimit`)"
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers.router2]
|
2018-11-14 09:18:03 +00:00
|
|
|
Service = "service2"
|
|
|
|
Middlewares = ["retry"]
|
2019-01-30 15:24:07 +00:00
|
|
|
Rule = "Path(`/retry`)"
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers.router3]
|
2018-11-14 09:18:03 +00:00
|
|
|
Service = "service3"
|
|
|
|
Middlewares = ["retry", "basic-auth"]
|
2019-01-30 15:24:07 +00:00
|
|
|
Rule = "Path(`/auth`)"
|
2018-04-11 14:30:04 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares]
|
|
|
|
[http.middlewares.retry.retry]
|
2018-11-14 09:18:03 +00:00
|
|
|
attempts = 3
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares.basic-auth.BasicAuth]
|
2018-11-14 09:18:03 +00:00
|
|
|
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares.ratelimit.RateLimit]
|
2018-11-14 09:18:03 +00:00
|
|
|
extractorfunc = "client.ip"
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares.ratelimit.RateLimit.rateset.rateset1]
|
2018-11-14 09:18:03 +00:00
|
|
|
period = "60s"
|
|
|
|
average = 4
|
|
|
|
burst = 5
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares.ratelimit.RateLimit.rateset.rateset2]
|
2018-11-14 09:18:03 +00:00
|
|
|
period = "3s"
|
|
|
|
average = 1
|
|
|
|
burst = 2
|
|
|
|
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services]
|
|
|
|
[http.services.service1]
|
|
|
|
[http.services.service1.LoadBalancer]
|
2018-11-14 09:18:03 +00:00
|
|
|
passHostHeader = true
|
2019-03-14 08:30:04 +00:00
|
|
|
[[http.services.service1.LoadBalancer.Servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
URL = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
|
|
|
Weight = 1
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service2]
|
2018-01-10 16:48:04 +00:00
|
|
|
passHostHeader = true
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service2.LoadBalancer]
|
|
|
|
[[http.services.service2.LoadBalancer.Servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
URL = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
|
|
|
Weight = 1
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service3]
|
2018-01-10 16:48:04 +00:00
|
|
|
passHostHeader = true
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service3.LoadBalancer]
|
|
|
|
[[http.services.service3.LoadBalancer.Servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
URL = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
|
|
|
Weight = 1
|