chore: autogen.
This commit is contained in:
parent
4b93d040b3
commit
5c0b18efe4
1 changed files with 265 additions and 80 deletions
|
@ -1,14 +1,17 @@
|
|||
// Code generated by go-bindata.
|
||||
// sources:
|
||||
// templates/consul_catalog-v1.tmpl
|
||||
// templates/consul_catalog.tmpl
|
||||
// templates/docker-v1.tmpl
|
||||
// templates/docker.tmpl
|
||||
// templates/ecs-v1.tmpl
|
||||
// templates/ecs.tmpl
|
||||
// templates/eureka.tmpl
|
||||
// templates/kubernetes.tmpl
|
||||
// templates/kv.tmpl
|
||||
// templates/marathon-v1.tmpl
|
||||
// templates/marathon.tmpl
|
||||
// templates/mesos-v1.tmpl
|
||||
// templates/mesos.tmpl
|
||||
// templates/notFound.tmpl
|
||||
// templates/rancher-v1.tmpl
|
||||
|
@ -57,17 +60,90 @@ func (fi bindataFileInfo) Sys() interface{} {
|
|||
return nil
|
||||
}
|
||||
|
||||
var _templatesConsul_catalogV1Tmpl = []byte(`[backends]
|
||||
{{range $index, $node := .Nodes }}
|
||||
[backends."backend-{{ getBackend $node }}".servers."{{ getBackendName $node $index }}"]
|
||||
url = "{{ getAttribute "protocol" $node.Service.Tags "http" }}://{{ getBackendAddress $node }}:{{ $node.Service.Port }}"
|
||||
{{ $weight := getAttribute "backend.weight" $node.Service.Tags "0" }}
|
||||
{{with $weight }}
|
||||
weight = {{ $weight }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{range .Services }}
|
||||
{{ $service := .ServiceName }}
|
||||
|
||||
{{ $circuitBreaker := getAttribute "backend.circuitbreaker" .Attributes "" }}
|
||||
{{with $circuitBreaker }}
|
||||
[backends."backend-{{ $service }}".circuitbreaker]
|
||||
expression = "{{ $circuitBreaker }}"
|
||||
{{end}}
|
||||
|
||||
[backends."backend-{{ $service }}".loadbalancer]
|
||||
method = "{{ getAttribute "backend.loadbalancer" .Attributes "wrr" }}"
|
||||
sticky = {{ getSticky .Attributes }}
|
||||
{{if hasStickinessLabel .Attributes }}
|
||||
[backends."backend-{{ $service }}".loadbalancer.stickiness]
|
||||
cookieName = "{{ getStickinessCookieName .Attributes }}"
|
||||
{{end}}
|
||||
|
||||
{{if hasMaxconnAttributes .Attributes }}
|
||||
[backends."backend-{{ $service }}".maxconn]
|
||||
amount = {{ getAttribute "backend.maxconn.amount" .Attributes "" }}
|
||||
extractorfunc = "{{ getAttribute "backend.maxconn.extractorfunc" .Attributes "" }}"
|
||||
{{end}}
|
||||
|
||||
{{end}}
|
||||
|
||||
[frontends]
|
||||
{{range .Services }}
|
||||
[frontends."frontend-{{ .ServiceName }}"]
|
||||
backend = "backend-{{ .ServiceName }}"
|
||||
passHostHeader = {{ getAttribute "frontend.passHostHeader" .Attributes "true" }}
|
||||
priority = {{ getAttribute "frontend.priority" .Attributes "0" }}
|
||||
|
||||
{{ $entryPoints := getAttribute "frontend.entrypoints" .Attributes "" }}
|
||||
{{with $entryPoints }}
|
||||
entrypoints = [{{range getEntryPoints $entryPoints }}
|
||||
"{{ . }}",
|
||||
{{end}}]
|
||||
{{end}}
|
||||
|
||||
basicAuth = [{{range getBasicAuth .Attributes }}
|
||||
"{{ . }}",
|
||||
{{end}}]
|
||||
|
||||
[frontends."frontend-{{ .ServiceName }}".routes."route-host-{{ .ServiceName }}"]
|
||||
rule = "{{ getFrontendRule . }}"
|
||||
{{end}}
|
||||
`)
|
||||
|
||||
func templatesConsul_catalogV1TmplBytes() ([]byte, error) {
|
||||
return _templatesConsul_catalogV1Tmpl, nil
|
||||
}
|
||||
|
||||
func templatesConsul_catalogV1Tmpl() (*asset, error) {
|
||||
bytes, err := templatesConsul_catalogV1TmplBytes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/consul_catalog-v1.tmpl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesConsul_catalogTmpl = []byte(`[backends]
|
||||
{{range $service := .Services}}
|
||||
{{ $backendName := getServiceBackendName $service }}
|
||||
|
||||
{{ $circuitBreaker := getCircuitBreaker $service.Attributes }}
|
||||
{{ $circuitBreaker := getCircuitBreaker $service.TraefikLabels }}
|
||||
{{if $circuitBreaker }}
|
||||
[backends."backend-{{ $backendName }}".circuitBreaker]
|
||||
expression = "{{ $circuitBreaker.Expression }}"
|
||||
{{end}}
|
||||
|
||||
{{ $loadBalancer := getLoadBalancer $service.Attributes }}
|
||||
{{ $loadBalancer := getLoadBalancer $service.TraefikLabels }}
|
||||
{{if $loadBalancer }}
|
||||
[backends."backend-{{ $backendName }}".loadBalancer]
|
||||
method = "{{ $loadBalancer.Method }}"
|
||||
|
@ -78,14 +154,14 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $maxConn := getMaxConn $service.Attributes }}
|
||||
{{ $maxConn := getMaxConn $service.TraefikLabels }}
|
||||
{{if $maxConn }}
|
||||
[backends."backend-{{ $backendName }}".maxConn]
|
||||
extractorFunc = "{{ $maxConn.ExtractorFunc }}"
|
||||
amount = {{ $maxConn.Amount }}
|
||||
{{end}}
|
||||
|
||||
{{ $healthCheck := getHealthCheck $service.Attributes }}
|
||||
{{ $healthCheck := getHealthCheck $service.TraefikLabels }}
|
||||
{{if $healthCheck }}
|
||||
[backends."backend-{{ $backendName }}".healthCheck]
|
||||
path = "{{ $healthCheck.Path }}"
|
||||
|
@ -93,7 +169,7 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
interval = "{{ $healthCheck.Interval }}"
|
||||
{{end}}
|
||||
|
||||
{{ $buffering := getBuffering $service.Attributes }}
|
||||
{{ $buffering := getBuffering $service.TraefikLabels }}
|
||||
{{if $buffering }}
|
||||
[backends."backend-{{ $backendName }}".buffering]
|
||||
maxRequestBodyBytes = {{ $buffering.MaxRequestBodyBytes }}
|
||||
|
@ -105,10 +181,10 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
|
||||
{{end}}
|
||||
{{range $index, $node := .Nodes}}
|
||||
|
||||
{{ $server := getServer $node }}
|
||||
[backends."backend-{{ getNodeBackendName $node }}".servers."{{ getServerName $node $index }}"]
|
||||
url = "{{ getProtocol $node.Service.Tags }}://{{ getBackendAddress $node }}:{{ $node.Service.Port }}"
|
||||
weight = {{ getWeight $node.Service.Tags }}
|
||||
url = "{{ $server.URL }}"
|
||||
weight = {{ $server.Weight }}
|
||||
|
||||
{{end}}
|
||||
|
||||
|
@ -117,19 +193,19 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
|
||||
[frontends."frontend-{{ $service.ServiceName }}"]
|
||||
backend = "backend-{{ getServiceBackendName $service }}"
|
||||
priority = {{ getPriority $service.Attributes }}
|
||||
passHostHeader = {{ getPassHostHeader $service.Attributes }}
|
||||
passTLSCert = {{ getPassTLSCert $service.Attributes }}
|
||||
priority = {{ getPriority $service.TraefikLabels }}
|
||||
passHostHeader = {{ getPassHostHeader $service.TraefikLabels }}
|
||||
passTLSCert = {{ getPassTLSCert $service.TraefikLabels }}
|
||||
|
||||
entryPoints = [{{range getFrontEndEntryPoints $service.Attributes }}
|
||||
entryPoints = [{{range getFrontEndEntryPoints $service.TraefikLabels }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
basicAuth = [{{range getBasicAuth $service.Attributes }}
|
||||
basicAuth = [{{range getBasicAuth $service.TraefikLabels }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
{{ $whitelist := getWhiteList $service.Attributes }}
|
||||
{{ $whitelist := getWhiteList $service.TraefikLabels }}
|
||||
{{if $whitelist }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".whiteList]
|
||||
sourceRange = [{{range $whitelist.SourceRange }}
|
||||
|
@ -138,7 +214,7 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
useXForwardedFor = {{ $whitelist.UseXForwardedFor }}
|
||||
{{end}}
|
||||
|
||||
{{ $redirect := getRedirect $service.Attributes }}
|
||||
{{ $redirect := getRedirect $service.TraefikLabels }}
|
||||
{{if $redirect }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".redirect]
|
||||
entryPoint = "{{ $redirect.EntryPoint }}"
|
||||
|
@ -147,9 +223,10 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
permanent = {{ $redirect.Permanent }}
|
||||
{{end}}
|
||||
|
||||
{{if hasErrorPages $service.Attributes }}
|
||||
{{ $errorPages := getErrorPages $service.TraefikLabels }}
|
||||
{{if $errorPages }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".errors]
|
||||
{{range $pageName, $page := getErrorPages $service.Attributes }}
|
||||
{{range $pageName, $page := $errorPages }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".errors."{{ $pageName }}"]
|
||||
status = [{{range $page.Status }}
|
||||
"{{.}}",
|
||||
|
@ -159,22 +236,20 @@ var _templatesConsul_catalogTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{if hasRateLimit $service.Attributes }}
|
||||
{{ $rateLimit := getRateLimit $service.Attributes }}
|
||||
{{ $rateLimit := getRateLimit $service.TraefikLabels }}
|
||||
{{if $rateLimit }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".rateLimit]
|
||||
extractorFunc = "{{ $rateLimit.ExtractorFunc }}"
|
||||
|
||||
[frontends."frontend-{{ $service.ServiceName }}".rateLimit.rateSet]
|
||||
{{range $limitName, $limit := $rateLimit.RateSet }}
|
||||
{{ range $limitName, $limit := $rateLimit.RateSet }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".rateLimit.rateSet."{{ $limitName }}"]
|
||||
period = "{{ $limit.Period }}"
|
||||
average = {{ $limit.Average }}
|
||||
burst = {{ $limit.Burst }}
|
||||
{{end}}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{ $headers := getHeaders $service.Attributes }}
|
||||
{{ $headers := getHeaders $service.TraefikLabels }}
|
||||
{{if $headers }}
|
||||
[frontends."frontend-{{ $service.ServiceName }}".headers]
|
||||
SSLRedirect = {{ $headers.SSLRedirect }}
|
||||
|
@ -651,17 +726,77 @@ func templatesDockerTmpl() (*asset, error) {
|
|||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesEcsV1Tmpl = []byte(`[backends]
|
||||
{{range $serviceName, $instances := .Services }}
|
||||
[backends."backend-{{ $serviceName }}".loadBalancer]
|
||||
method = "{{ getLoadBalancerMethod $instances }}"
|
||||
sticky = {{ getLoadBalancerSticky $instances }}
|
||||
|
||||
{{if hasStickinessLabel $instances }}
|
||||
[backends."backend-{{ $serviceName }}".loadBalancer.stickiness]
|
||||
cookieName = "{{ getStickinessCookieName $instances }}"
|
||||
{{end}}
|
||||
|
||||
{{ if hasHealthCheckLabels $instances }}
|
||||
[backends."backend-{{ $serviceName }}".healthCheck]
|
||||
path = "{{ getHealthCheckPath $instances }}"
|
||||
interval = "{{ getHealthCheckInterval $instances }}"
|
||||
{{end}}
|
||||
|
||||
{{range $index, $i := $instances }}
|
||||
[backends."backend-{{ $i.Name }}".servers."server-{{ $i.Name }}{{ $i.ID }}"]
|
||||
url = "{{ getProtocol $i }}://{{ getHost $i }}:{{ getPort $i }}"
|
||||
weight = {{ getWeight $i }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
[frontends]
|
||||
{{range $serviceName, $instances := .Services}}
|
||||
{{range filterFrontends $instances }}
|
||||
[frontends."frontend-{{ $serviceName }}"]
|
||||
backend = "backend-{{ $serviceName }}"
|
||||
passHostHeader = {{ getPassHostHeader . }}
|
||||
priority = {{ getPriority . }}
|
||||
|
||||
entryPoints = [{{range getEntryPoints . }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
basicAuth = [{{range getBasicAuth . }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
[frontends."frontend-{{ $serviceName }}".routes."route-frontend-{{ $serviceName }}"]
|
||||
rule = "{{getFrontendRule .}}"
|
||||
{{end}}
|
||||
{{end}}`)
|
||||
|
||||
func templatesEcsV1TmplBytes() ([]byte, error) {
|
||||
return _templatesEcsV1Tmpl, nil
|
||||
}
|
||||
|
||||
func templatesEcsV1Tmpl() (*asset, error) {
|
||||
bytes, err := templatesEcsV1TmplBytes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/ecs-v1.tmpl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesEcsTmpl = []byte(`[backends]
|
||||
{{range $serviceName, $instances := .Services }}
|
||||
{{ $firstInstance := index $instances 0 }}
|
||||
|
||||
{{ $circuitBreaker := getCircuitBreaker $firstInstance }}
|
||||
{{ $circuitBreaker := getCircuitBreaker $firstInstance.TraefikLabels }}
|
||||
{{if $circuitBreaker }}
|
||||
[backends."backend-{{ $serviceName }}".circuitBreaker]
|
||||
expression = "{{ $circuitBreaker.Expression }}"
|
||||
{{end}}
|
||||
|
||||
{{ $loadBalancer := getLoadBalancer $firstInstance }}
|
||||
{{ $loadBalancer := getLoadBalancer $firstInstance.TraefikLabels }}
|
||||
{{if $loadBalancer }}
|
||||
[backends."backend-{{ $serviceName }}".loadBalancer]
|
||||
method = "{{ $loadBalancer.Method }}"
|
||||
|
@ -672,14 +807,14 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $maxConn := getMaxConn $firstInstance }}
|
||||
{{ $maxConn := getMaxConn $firstInstance.TraefikLabels }}
|
||||
{{if $maxConn }}
|
||||
[backends."backend-{{ $serviceName }}".maxConn]
|
||||
extractorFunc = "{{ $maxConn.ExtractorFunc }}"
|
||||
amount = {{ $maxConn.Amount }}
|
||||
{{end}}
|
||||
|
||||
{{ $healthCheck := getHealthCheck $firstInstance }}
|
||||
{{ $healthCheck := getHealthCheck $firstInstance.TraefikLabels }}
|
||||
{{if $healthCheck }}
|
||||
[backends."backend-{{ $serviceName }}".healthCheck]
|
||||
path = "{{ $healthCheck.Path }}"
|
||||
|
@ -687,7 +822,7 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
interval = "{{ $healthCheck.Interval }}"
|
||||
{{end}}
|
||||
|
||||
{{ $buffering := getBuffering $firstInstance }}
|
||||
{{ $buffering := getBuffering $firstInstance.TraefikLabels }}
|
||||
{{if $buffering }}
|
||||
[backends."backend-{{ $serviceName }}".buffering]
|
||||
maxRequestBodyBytes = {{ $buffering.MaxRequestBodyBytes }}
|
||||
|
@ -711,19 +846,19 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
|
||||
[frontends."frontend-{{ $serviceName }}"]
|
||||
backend = "backend-{{ $serviceName }}"
|
||||
priority = {{ getPriority $instance }}
|
||||
passHostHeader = {{ getPassHostHeader $instance }}
|
||||
passTLSCert = {{ getPassTLSCert $instance }}
|
||||
priority = {{ getPriority $instance.TraefikLabels }}
|
||||
passHostHeader = {{ getPassHostHeader $instance.TraefikLabels }}
|
||||
passTLSCert = {{ getPassTLSCert $instance.TraefikLabels }}
|
||||
|
||||
entryPoints = [{{range getEntryPoints $instance }}
|
||||
entryPoints = [{{range getEntryPoints $instance.TraefikLabels }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
basicAuth = [{{range getBasicAuth $instance }}
|
||||
basicAuth = [{{range getBasicAuth $instance.TraefikLabels }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
{{ $whitelist := getWhiteList $instance }}
|
||||
{{ $whitelist := getWhiteList $instance.TraefikLabels }}
|
||||
{{if $whitelist }}
|
||||
[frontends."frontend-{{ $serviceName }}".whiteList]
|
||||
sourceRange = [{{range $whitelist.SourceRange }}
|
||||
|
@ -732,7 +867,7 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
useXForwardedFor = {{ $whitelist.UseXForwardedFor }}
|
||||
{{end}}
|
||||
|
||||
{{ $redirect := getRedirect $instance }}
|
||||
{{ $redirect := getRedirect $instance.TraefikLabels }}
|
||||
{{if $redirect }}
|
||||
[frontends."frontend-{{ $serviceName }}".redirect]
|
||||
entryPoint = "{{ $redirect.EntryPoint }}"
|
||||
|
@ -741,7 +876,7 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
permanent = {{ $redirect.Permanent }}
|
||||
{{end}}
|
||||
|
||||
{{ $errorPages := getErrorPages $instance }}
|
||||
{{ $errorPages := getErrorPages $instance.TraefikLabels }}
|
||||
{{if $errorPages }}
|
||||
[frontends."frontend-{{ $serviceName }}".errors]
|
||||
{{range $pageName, $page := $errorPages }}
|
||||
|
@ -754,7 +889,7 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $rateLimit := getRateLimit $instance }}
|
||||
{{ $rateLimit := getRateLimit $instance.TraefikLabels }}
|
||||
{{if $rateLimit }}
|
||||
[frontends."frontend-{{ $serviceName }}".rateLimit]
|
||||
extractorFunc = "{{ $rateLimit.ExtractorFunc }}"
|
||||
|
@ -767,7 +902,7 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $headers := getHeaders $instance }}
|
||||
{{ $headers := getHeaders $instance.TraefikLabels }}
|
||||
{{if $headers }}
|
||||
[frontends."frontend-{{ $serviceName }}".headers]
|
||||
SSLRedirect = {{ $headers.SSLRedirect }}
|
||||
|
@ -822,7 +957,7 @@ var _templatesEcsTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
|
||||
[frontends."frontend-{{ $serviceName }}".routes."route-frontend-{{ $serviceName }}"]
|
||||
rule = "{{getFrontendRule $instance}}"
|
||||
rule = "{{ getFrontendRule $instance }}"
|
||||
|
||||
{{end}}
|
||||
{{end}}`)
|
||||
|
@ -1547,6 +1682,50 @@ func templatesMarathonTmpl() (*asset, error) {
|
|||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesMesosV1Tmpl = []byte(`{{$apps := .Applications}}
|
||||
|
||||
[backends]
|
||||
{{range .Tasks}}
|
||||
|
||||
[backends."backend-{{ getBackend . $apps }}".servers."server-{{ getID . }}"]
|
||||
url = "{{ getProtocol . $apps }}://{{ getHost . }}:{{ getPort . $apps }}"
|
||||
weight = {{ getWeight . $apps }}
|
||||
|
||||
{{end}}
|
||||
|
||||
[frontends]
|
||||
{{range .Applications}}
|
||||
|
||||
[frontends."frontend-{{getFrontEndName . }}"]
|
||||
backend = "backend-{{ getFrontendBackend . }}"
|
||||
passHostHeader = {{ getPassHostHeader . }}
|
||||
priority = {{ getPriority . }}
|
||||
|
||||
entryPoints = [{{range getEntryPoints . }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
[frontends."frontend-{{ getFrontEndName . }}".routes."route-host-{{ getFrontEndName . }}"]
|
||||
rule = "{{ getFrontendRule . }}"
|
||||
|
||||
{{end}}
|
||||
`)
|
||||
|
||||
func templatesMesosV1TmplBytes() ([]byte, error) {
|
||||
return _templatesMesosV1Tmpl, nil
|
||||
}
|
||||
|
||||
func templatesMesosV1Tmpl() (*asset, error) {
|
||||
bytes, err := templatesMesosV1TmplBytes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/mesos-v1.tmpl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templatesMesosTmpl = []byte(`[backends]
|
||||
{{range $applicationName, $tasks := .ApplicationsTasks }}
|
||||
{{ $app := index $tasks 0 }}
|
||||
|
@ -1554,13 +1733,13 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
|
||||
[backends."backend-{{ $backendName }}"]
|
||||
|
||||
{{ $circuitBreaker := getCircuitBreaker $app }}
|
||||
{{ $circuitBreaker := getCircuitBreaker $app.TraefikLabels }}
|
||||
{{if $circuitBreaker }}
|
||||
[backends."backend-{{ $backendName }}".circuitBreaker]
|
||||
expression = "{{ $circuitBreaker.Expression }}"
|
||||
{{end}}
|
||||
|
||||
{{ $loadBalancer := getLoadBalancer $app }}
|
||||
{{ $loadBalancer := getLoadBalancer $app.TraefikLabels }}
|
||||
{{if $loadBalancer }}
|
||||
[backends."backend-{{ $backendName }}".loadBalancer]
|
||||
method = "{{ $loadBalancer.Method }}"
|
||||
|
@ -1571,14 +1750,14 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $maxConn := getMaxConn $app }}
|
||||
{{ $maxConn := getMaxConn $app.TraefikLabels }}
|
||||
{{if $maxConn }}
|
||||
[backends."backend-{{ $backendName }}".maxConn]
|
||||
extractorFunc = "{{ $maxConn.ExtractorFunc }}"
|
||||
amount = {{ $maxConn.Amount }}
|
||||
{{end}}
|
||||
|
||||
{{ $healthCheck := getHealthCheck $app }}
|
||||
{{ $healthCheck := getHealthCheck $app.TraefikLabels }}
|
||||
{{if $healthCheck }}
|
||||
[backends."backend-{{ $backendName }}".healthCheck]
|
||||
path = "{{ $healthCheck.Path }}"
|
||||
|
@ -1586,7 +1765,7 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
interval = "{{ $healthCheck.Interval }}"
|
||||
{{end}}
|
||||
|
||||
{{ $buffering := getBuffering $app }}
|
||||
{{ $buffering := getBuffering $app.TraefikLabels }}
|
||||
{{if $buffering }}
|
||||
[backends."backend-{{ $backendName }}".buffering]
|
||||
maxRequestBodyBytes = {{ $buffering.MaxRequestBodyBytes }}
|
||||
|
@ -1610,19 +1789,19 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
|
||||
[frontends."frontend-{{ $frontendName }}"]
|
||||
backend = "backend-{{ getBackendName $app }}"
|
||||
priority = {{ getPriority $app }}
|
||||
passHostHeader = {{ getPassHostHeader $app }}
|
||||
passTLSCert = {{ getPassTLSCert $app }}
|
||||
priority = {{ getPriority $app.TraefikLabels }}
|
||||
passHostHeader = {{ getPassHostHeader $app.TraefikLabels }}
|
||||
passTLSCert = {{ getPassTLSCert $app.TraefikLabels }}
|
||||
|
||||
entryPoints = [{{range getEntryPoints $app }}
|
||||
entryPoints = [{{range getEntryPoints $app.TraefikLabels }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
basicAuth = [{{range getBasicAuth $app }}
|
||||
basicAuth = [{{range getBasicAuth $app.TraefikLabels }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
{{ $whitelist := getWhiteList $app }}
|
||||
{{ $whitelist := getWhiteList $app.TraefikLabels }}
|
||||
{{if $whitelist }}
|
||||
[frontends."frontend-{{ $frontendName }}".whiteList]
|
||||
sourceRange = [{{range $whitelist.SourceRange }}
|
||||
|
@ -1631,7 +1810,7 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
useXForwardedFor = {{ $whitelist.UseXForwardedFor }}
|
||||
{{end}}
|
||||
|
||||
{{ $redirect := getRedirect $app }}
|
||||
{{ $redirect := getRedirect $app.TraefikLabels }}
|
||||
{{if $redirect }}
|
||||
[frontends."frontend-{{ $frontendName }}".redirect]
|
||||
entryPoint = "{{ $redirect.EntryPoint }}"
|
||||
|
@ -1640,7 +1819,7 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
permanent = {{ $redirect.Permanent }}
|
||||
{{end}}
|
||||
|
||||
{{ $errorPages := getErrorPages $app }}
|
||||
{{ $errorPages := getErrorPages $app.TraefikLabels }}
|
||||
{{if $errorPages }}
|
||||
[frontends."frontend-{{ $frontendName }}".errors]
|
||||
{{range $pageName, $page := $errorPages }}
|
||||
|
@ -1653,7 +1832,7 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $rateLimit := getRateLimit $app }}
|
||||
{{ $rateLimit := getRateLimit $app.TraefikLabels }}
|
||||
{{if $rateLimit }}
|
||||
[frontends."frontend-{{ $frontendName }}".rateLimit]
|
||||
extractorFunc = "{{ $rateLimit.ExtractorFunc }}"
|
||||
|
@ -1666,7 +1845,7 @@ var _templatesMesosTmpl = []byte(`[backends]
|
|||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ $headers := getHeaders $app }}
|
||||
{{ $headers := getHeaders $app.TraefikLabels }}
|
||||
{{if $headers }}
|
||||
[frontends."frontend-{{ $frontendName }}".headers]
|
||||
SSLRedirect = {{ $headers.SSLRedirect }}
|
||||
|
@ -2084,19 +2263,22 @@ func AssetNames() []string {
|
|||
|
||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||
var _bindata = map[string]func() (*asset, error){
|
||||
"templates/consul_catalog.tmpl": templatesConsul_catalogTmpl,
|
||||
"templates/docker-v1.tmpl": templatesDockerV1Tmpl,
|
||||
"templates/docker.tmpl": templatesDockerTmpl,
|
||||
"templates/ecs.tmpl": templatesEcsTmpl,
|
||||
"templates/eureka.tmpl": templatesEurekaTmpl,
|
||||
"templates/kubernetes.tmpl": templatesKubernetesTmpl,
|
||||
"templates/kv.tmpl": templatesKvTmpl,
|
||||
"templates/marathon-v1.tmpl": templatesMarathonV1Tmpl,
|
||||
"templates/marathon.tmpl": templatesMarathonTmpl,
|
||||
"templates/mesos.tmpl": templatesMesosTmpl,
|
||||
"templates/notFound.tmpl": templatesNotfoundTmpl,
|
||||
"templates/rancher-v1.tmpl": templatesRancherV1Tmpl,
|
||||
"templates/rancher.tmpl": templatesRancherTmpl,
|
||||
"templates/consul_catalog-v1.tmpl": templatesConsul_catalogV1Tmpl,
|
||||
"templates/consul_catalog.tmpl": templatesConsul_catalogTmpl,
|
||||
"templates/docker-v1.tmpl": templatesDockerV1Tmpl,
|
||||
"templates/docker.tmpl": templatesDockerTmpl,
|
||||
"templates/ecs-v1.tmpl": templatesEcsV1Tmpl,
|
||||
"templates/ecs.tmpl": templatesEcsTmpl,
|
||||
"templates/eureka.tmpl": templatesEurekaTmpl,
|
||||
"templates/kubernetes.tmpl": templatesKubernetesTmpl,
|
||||
"templates/kv.tmpl": templatesKvTmpl,
|
||||
"templates/marathon-v1.tmpl": templatesMarathonV1Tmpl,
|
||||
"templates/marathon.tmpl": templatesMarathonTmpl,
|
||||
"templates/mesos-v1.tmpl": templatesMesosV1Tmpl,
|
||||
"templates/mesos.tmpl": templatesMesosTmpl,
|
||||
"templates/notFound.tmpl": templatesNotfoundTmpl,
|
||||
"templates/rancher-v1.tmpl": templatesRancherV1Tmpl,
|
||||
"templates/rancher.tmpl": templatesRancherTmpl,
|
||||
}
|
||||
|
||||
// AssetDir returns the file names below a certain
|
||||
|
@ -2141,19 +2323,22 @@ type bintree struct {
|
|||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"templates": {nil, map[string]*bintree{
|
||||
"consul_catalog.tmpl": {templatesConsul_catalogTmpl, map[string]*bintree{}},
|
||||
"docker-v1.tmpl": {templatesDockerV1Tmpl, map[string]*bintree{}},
|
||||
"docker.tmpl": {templatesDockerTmpl, map[string]*bintree{}},
|
||||
"ecs.tmpl": {templatesEcsTmpl, map[string]*bintree{}},
|
||||
"eureka.tmpl": {templatesEurekaTmpl, map[string]*bintree{}},
|
||||
"kubernetes.tmpl": {templatesKubernetesTmpl, map[string]*bintree{}},
|
||||
"kv.tmpl": {templatesKvTmpl, map[string]*bintree{}},
|
||||
"marathon-v1.tmpl": {templatesMarathonV1Tmpl, map[string]*bintree{}},
|
||||
"marathon.tmpl": {templatesMarathonTmpl, map[string]*bintree{}},
|
||||
"mesos.tmpl": {templatesMesosTmpl, map[string]*bintree{}},
|
||||
"notFound.tmpl": {templatesNotfoundTmpl, map[string]*bintree{}},
|
||||
"rancher-v1.tmpl": {templatesRancherV1Tmpl, map[string]*bintree{}},
|
||||
"rancher.tmpl": {templatesRancherTmpl, map[string]*bintree{}},
|
||||
"consul_catalog-v1.tmpl": {templatesConsul_catalogV1Tmpl, map[string]*bintree{}},
|
||||
"consul_catalog.tmpl": {templatesConsul_catalogTmpl, map[string]*bintree{}},
|
||||
"docker-v1.tmpl": {templatesDockerV1Tmpl, map[string]*bintree{}},
|
||||
"docker.tmpl": {templatesDockerTmpl, map[string]*bintree{}},
|
||||
"ecs-v1.tmpl": {templatesEcsV1Tmpl, map[string]*bintree{}},
|
||||
"ecs.tmpl": {templatesEcsTmpl, map[string]*bintree{}},
|
||||
"eureka.tmpl": {templatesEurekaTmpl, map[string]*bintree{}},
|
||||
"kubernetes.tmpl": {templatesKubernetesTmpl, map[string]*bintree{}},
|
||||
"kv.tmpl": {templatesKvTmpl, map[string]*bintree{}},
|
||||
"marathon-v1.tmpl": {templatesMarathonV1Tmpl, map[string]*bintree{}},
|
||||
"marathon.tmpl": {templatesMarathonTmpl, map[string]*bintree{}},
|
||||
"mesos-v1.tmpl": {templatesMesosV1Tmpl, map[string]*bintree{}},
|
||||
"mesos.tmpl": {templatesMesosTmpl, map[string]*bintree{}},
|
||||
"notFound.tmpl": {templatesNotfoundTmpl, map[string]*bintree{}},
|
||||
"rancher-v1.tmpl": {templatesRancherV1Tmpl, map[string]*bintree{}},
|
||||
"rancher.tmpl": {templatesRancherTmpl, map[string]*bintree{}},
|
||||
}},
|
||||
}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue