38 lines
1.3 KiB
Cheetah
38 lines
1.3 KiB
Cheetah
[backends]{{range $backendName, $backend := .Backends}}
|
|
[backends."{{$backendName}}"]
|
|
{{if $backend.CircuitBreaker}}
|
|
[backends."{{$backendName}}".circuitbreaker]
|
|
expression = "{{$backend.CircuitBreaker.Expression}}"
|
|
{{end}}
|
|
[backends."{{$backendName}}".loadbalancer]
|
|
method = "{{$backend.LoadBalancer.Method}}"
|
|
{{if $backend.LoadBalancer.Sticky}}
|
|
sticky = true
|
|
{{end}}
|
|
{{if $backend.LoadBalancer.Stickiness}}
|
|
[backends."{{$backendName}}".loadbalancer.stickiness]
|
|
cookieName = "{{$backend.LoadBalancer.Stickiness.CookieName}}"
|
|
{{end}}
|
|
{{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}}"
|
|
priority = {{$frontend.Priority}}
|
|
passHostHeader = {{$frontend.PassHostHeader}}
|
|
basicAuth = [{{range $frontend.BasicAuth}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
whitelistSourceRange = [{{range $frontend.WhitelistSourceRange}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
{{range $routeName, $route := $frontend.Routes}}
|
|
[frontends."{{$frontendName}}".routes."{{$routeName}}"]
|
|
rule = "{{$route.Rule}}"
|
|
{{end}}
|
|
{{end}}
|