2016-02-08 20:57:32 +00:00
|
|
|
[backends]{{range $backendName, $backend := .Backends}}
|
2017-05-15 21:16:35 +00:00
|
|
|
[backends."{{$backendName}}"]
|
2017-02-03 16:47:48 +00:00
|
|
|
{{if $backend.CircuitBreaker}}
|
|
|
|
[backends."{{$backendName}}".circuitbreaker]
|
|
|
|
expression = "{{$backend.CircuitBreaker.Expression}}"
|
|
|
|
{{end}}
|
2017-01-25 13:11:00 +00:00
|
|
|
[backends."{{$backendName}}".loadbalancer]
|
|
|
|
method = "{{$backend.LoadBalancer.Method}}"
|
2017-10-10 09:10:02 +00:00
|
|
|
{{if $backend.LoadBalancer.Stickiness}}
|
|
|
|
[Backends."{{$backendName}}".LoadBalancer.Stickiness]
|
|
|
|
cookieName = {{$backend.LoadBalancer.Stickiness.CookieName}}
|
2017-01-25 13:11:00 +00:00
|
|
|
{{end}}
|
2016-02-08 20:57:32 +00:00
|
|
|
{{range $serverName, $server := $backend.Servers}}
|
|
|
|
[backends."{{$backendName}}".servers."{{$serverName}}"]
|
|
|
|
url = "{{$server.URL}}"
|
|
|
|
weight = {{$server.Weight}}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
[frontends]{{range $frontendName, $frontend := .Frontends}}
|
|
|
|
[frontends."{{$frontendName}}"]
|
|
|
|
backend = "{{$frontend.Backend}}"
|
2016-08-02 23:48:53 +00:00
|
|
|
priority = {{$frontend.Priority}}
|
2016-05-10 11:43:24 +00:00
|
|
|
passHostHeader = {{$frontend.PassHostHeader}}
|
2017-04-23 14:17:20 +00:00
|
|
|
basicAuth = [{{range $frontend.BasicAuth}}
|
|
|
|
"{{.}}",
|
2017-04-30 09:22:07 +00:00
|
|
|
{{end}}]
|
|
|
|
whitelistSourceRange = [{{range $frontend.WhitelistSourceRange}}
|
|
|
|
"{{.}}",
|
2017-04-23 14:17:20 +00:00
|
|
|
{{end}}]
|
2016-02-08 20:57:32 +00:00
|
|
|
{{range $routeName, $route := $frontend.Routes}}
|
|
|
|
[frontends."{{$frontendName}}".routes."{{$routeName}}"]
|
2016-04-20 11:26:51 +00:00
|
|
|
rule = "{{$route.Rule}}"
|
2016-02-08 20:57:32 +00:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|