62 lines
No EOL
1.9 KiB
Cheetah
62 lines
No EOL
1.9 KiB
Cheetah
[backends]
|
|
{{range $serviceName, $instances := .Services}}
|
|
|
|
{{if hasCircuitBreakerLabel $instances}}
|
|
[backends.backend-{{ $serviceName }}.circuitBreaker]
|
|
expression = "{{getCircuitBreakerExpression $instances}}"
|
|
{{end}}
|
|
|
|
{{if hasLoadBalancerLabel $instances}}
|
|
[backends.backend-{{ $serviceName }}.loadBalancer]
|
|
method = "{{ getLoadBalancerMethod $instances}}"
|
|
sticky = {{ getSticky $instances}}
|
|
{{if hasStickinessLabel $instances}}
|
|
[backends.backend-{{ $serviceName }}.loadBalancer.stickiness]
|
|
cookieName = "{{getStickinessCookieName $instances}}"
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{if hasMaxConnLabels $instances}}
|
|
[backends.backend-{{ $serviceName }}.maxConn]
|
|
amount = {{getMaxConnAmount $instances}}
|
|
extractorFunc = "{{getMaxConnExtractorFunc $instances}}"
|
|
{{end}}
|
|
|
|
{{ if hasHealthCheckLabels $instances }}
|
|
[backends.backend-{{ $serviceName }}.healthCheck]
|
|
path = "{{getHealthCheckPath $instances }}"
|
|
port = {{getHealthCheckPort $instances}}
|
|
interval = "{{getHealthCheckInterval $instances }}"
|
|
{{end}}
|
|
|
|
{{range $index, $instance := $instances}}
|
|
[backends.backend-{{ $instance.Name }}.servers.server-{{ $instance.Name }}{{ $instance.ID }}]
|
|
url = "{{ getProtocol $instance }}://{{ getHost $instance }}:{{ getPort $instance }}"
|
|
weight = {{ getWeight $instance}}
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
[frontends]
|
|
{{range $serviceName, $instances := .Services}}
|
|
{{range filterFrontends $instances}}
|
|
|
|
[frontends.frontend-{{ $serviceName }}]
|
|
backend = "backend-{{ $serviceName }}"
|
|
priority = {{ getPriority .}}
|
|
passHostHeader = {{ getPassHostHeader .}}
|
|
passTLSCert = {{ getPassTLSCert .}}
|
|
|
|
entryPoints = [{{range getEntryPoints .}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
|
|
basicAuth = [{{range getBasicAuth .}}
|
|
"{{.}}",
|
|
{{end}}]
|
|
|
|
[frontends.frontend-{{ $serviceName }}.routes.route-frontend-{{ $serviceName }}]
|
|
rule = "{{getFrontendRule .}}"
|
|
|
|
{{end}}
|
|
{{end}} |