2016-02-08 21:57:32 +01:00
|
|
|
[backends]{{range $backendName, $backend := .Backends}}
|
2017-05-15 23:16:35 +02:00
|
|
|
[backends."{{$backendName}}"]
|
2017-02-03 11:47:48 -05:00
|
|
|
{{if $backend.CircuitBreaker}}
|
|
|
|
[backends."{{$backendName}}".circuitbreaker]
|
|
|
|
expression = "{{$backend.CircuitBreaker.Expression}}"
|
|
|
|
{{end}}
|
2017-01-25 08:11:00 -05:00
|
|
|
[backends."{{$backendName}}".loadbalancer]
|
|
|
|
method = "{{$backend.LoadBalancer.Method}}"
|
|
|
|
{{if $backend.LoadBalancer.Sticky}}
|
|
|
|
sticky = true
|
|
|
|
{{end}}
|
2016-02-08 21:57:32 +01: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 16:48:53 -07:00
|
|
|
priority = {{$frontend.Priority}}
|
2016-05-10 07:43:24 -04:00
|
|
|
passHostHeader = {{$frontend.PassHostHeader}}
|
2017-04-23 16:17:20 +02:00
|
|
|
basicAuth = [{{range $frontend.BasicAuth}}
|
|
|
|
"{{.}}",
|
2017-04-30 11:22:07 +02:00
|
|
|
{{end}}]
|
|
|
|
whitelistSourceRange = [{{range $frontend.WhitelistSourceRange}}
|
|
|
|
"{{.}}",
|
2017-04-23 16:17:20 +02:00
|
|
|
{{end}}]
|
2016-02-08 21:57:32 +01:00
|
|
|
{{range $routeName, $route := $frontend.Routes}}
|
|
|
|
[frontends."{{$frontendName}}".routes."{{$routeName}}"]
|
2016-04-20 13:26:51 +02:00
|
|
|
rule = "{{$route.Rule}}"
|
2016-02-08 21:57:32 +01:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|