2015-09-10 16:14:08 +02:00
{{ $ apps := .Applications}}
2017-05-22 23:21:15 +02:00
2017-12-16 14:47:03 +01:00
[backends]
2017-05-22 23:21:15 +02:00
{{range $ app := $ apps }}
2017-08-21 10:46:03 +02:00
{{range $ serviceIndex , $ serviceName := getServiceNames $ app }}
2017-12-16 14:47:03 +01:00
[backends."{{getBackend $ app $ serviceName }}"]
{{ if hasCircuitBreakerLabels $ app }}
[backends."{{getBackend $ app $ serviceName }}".circuitBreaker]
expression = "{{getCircuitBreakerExpression $ app }}"
{{end}}
{{ if hasLoadBalancerLabels $ app }}
[backends."{{getBackend $ app $ serviceName }}".loadBalancer]
method = "{{getLoadBalancerMethod $ app }}"
sticky = {{getSticky $ app }}
{{if hasStickinessLabel $ app }}
[backends."{{getBackend $ app $ serviceName }}".loadBalancer.stickiness]
cookieName = "{{getStickinessCookieName $ app }}"
{{end}}
{{end}}
{{ if hasMaxConnLabels $ app }}
[backends."{{getBackend $ app $ serviceName }}".maxConn]
amount = {{getMaxConnAmount $ app }}
extractorFunc = "{{getMaxConnExtractorFunc $ app }}"
{{end}}
{{ if hasHealthCheckLabels $ app }}
[backends."{{getBackend $ app $ serviceName }}".healthCheck]
path = "{{getHealthCheckPath $ app }}"
2017-12-16 14:47:49 +01:00
port = {{getHealthCheckPort $ app }}
2017-12-16 14:47:03 +01:00
interval = "{{getHealthCheckInterval $ app }}"
{{end}}
2017-05-22 23:21:15 +02:00
{{end}}
2017-12-16 14:47:03 +01:00
{{range $ task := $ app . Tasks }}
{{range $ serviceIndex , $ serviceName := getServiceNames $ app }}
[backends."{{getBackend $ app $ serviceName }}".servers."server-{{ $ task . ID | replace "." "-"}}{{getServiceNameSuffix $ serviceName }}"]
url = "{{getProtocol $ app $ serviceName }}://{{getBackendServer $ task $ app }}:{{getPort $ task $ app $ serviceName }}"
weight = {{getWeight $ app $ serviceName }}
{{end}}
{{end}}
2015-09-09 22:39:08 +02:00
{{end}}
2017-12-16 14:47:03 +01:00
[frontends]
2017-08-21 10:46:03 +02:00
{{range $ app := $ apps }}
2017-12-16 14:47:03 +01:00
{{range $ serviceIndex , $ serviceName := getServiceNames .}}
2016-08-13 12:55:15 -04:00
2017-08-21 10:46:03 +02:00
[frontends."{{ getFrontendName $ app $ serviceName }}"]
2017-12-16 14:47:03 +01:00
backend = "{{getBackend $ app $ serviceName }}"
priority = {{getPriority $ app $ serviceName }}
passHostHeader = {{getPassHostHeader $ app $ serviceName }}
2017-12-16 14:58:36 +01:00
passTLSCert = {{getPassTLSCert $ app $ serviceName }}
2017-12-16 14:47:03 +01:00
entryPoints = [{{range getEntryPoints $ app $ serviceName }}
"{{.}}",
{{end}}]
2017-12-16 15:01:45 +01:00
{{if getWhitelistSourceRange $ app $ serviceName }}
whitelistSourceRange = [{{range getWhitelistSourceRange $ app $ serviceName }}
"{{.}}",
{{end}}]
{{end}}
2017-12-16 14:47:03 +01:00
basicAuth = [{{range getBasicAuth $ app $ serviceName }}
"{{.}}",
{{end}}]
2017-12-16 15:15:49 +01:00
{{if hasRedirect $ app $ serviceName }}
[frontends."{{ getFrontendName $ app $ serviceName }}".redirect]
entryPoint = "{{getRedirectEntryPoint $ app $ serviceName }}"
regex = "{{getRedirectRegex $ app $ serviceName }}"
replacement = "{{getRedirectReplacement $ app $ serviceName }}"
{{end}}
2017-08-21 10:46:03 +02:00
[frontends."{{ getFrontendName $ app $ serviceName }}".routes."route-host{{ $ app . ID | replace "/" "-"}}{{getServiceNameSuffix $ serviceName }}"]
2017-12-16 14:47:03 +01:00
rule = "{{getFrontendRule $ app $ serviceName }}"
{{end}}
{{end}}