traefik/templates/marathon.tmpl

36 lines
1.2 KiB
Cheetah
Raw Normal View History

2015-09-10 14:14:08 +00:00
{{$apps := .Applications}}
2015-09-09 20:39:08 +00:00
[backends]{{range .Tasks}}
2016-10-11 14:12:23 +00:00
[backends."backend{{getBackend . $apps}}".servers."server-{{.ID | replace "." "-"}}"]
url = "{{getProtocol . $apps}}://{{getBackendServer . $apps}}:{{getPort . $apps}}"
weight = {{getWeight . $apps}}
2015-09-09 20:39:08 +00:00
{{end}}
{{range .Applications}}
{{ if hasMaxConnLabels . }}
2016-10-11 14:12:23 +00:00
[backends."backend{{getFrontendBackend . }}".maxconn]
amount = {{getMaxConnAmount . }}
extractorfunc = "{{getMaxConnExtractorFunc . }}"
{{end}}
{{ if hasLoadBalancerLabels . }}
2016-10-11 14:12:23 +00:00
[backends."backend{{getFrontendBackend . }}".loadbalancer]
method = "{{getLoadBalancerMethod . }}"
sticky = {{getSticky .}}
{{end}}
{{ if hasCircuitBreakerLabels . }}
2016-10-11 14:12:23 +00:00
[backends."backend{{getFrontendBackend . }}".circuitbreaker]
expression = "{{getCircuitBreakerExpression . }}"
{{end}}
{{end}}
[frontends]{{range .Applications}}
2016-10-11 14:12:23 +00:00
[frontends."frontend{{.ID | replace "/" "-"}}"]
backend = "backend{{getFrontendBackend .}}"
passHostHeader = {{getPassHostHeader .}}
priority = {{getPriority .}}
2016-02-01 15:08:58 +00:00
entryPoints = [{{range getEntryPoints .}}
"{{.}}",
{{end}}]
2016-10-11 14:12:23 +00:00
[frontends."frontend{{.ID | replace "/" "-"}}".routes."route-host{{.ID | replace "/" "-"}}"]
rule = "{{getFrontendRule .}}"
{{end}}