mirror of
https://github.com/containous/traefik.git
synced 2024-12-22 13:34:03 +03:00
feat(marathon): add HealthCheck port label.
This commit is contained in:
parent
4524cdc151
commit
81e3b2dd4c
@ -43,6 +43,7 @@ func (p *Provider) buildConfiguration() *types.Configuration {
|
||||
"getStickinessCookieName": getFuncString(label.TraefikBackendLoadBalancerStickinessCookieName, ""),
|
||||
"hasHealthCheckLabels": hasFunc(label.TraefikBackendHealthCheckPath),
|
||||
"getHealthCheckPath": getFuncString(label.TraefikBackendHealthCheckPath, ""),
|
||||
"getHealthCheckPort": getFuncInt(label.TraefikBackendHealthCheckPort, label.DefaultBackendHealthCheckPort),
|
||||
"getHealthCheckInterval": getFuncString(label.TraefikBackendHealthCheckInterval, ""),
|
||||
"getBasicAuth": getFuncSliceStringService(label.TraefikFrontendAuthBasic),
|
||||
"getServiceNames": getServiceNames,
|
||||
@ -414,3 +415,9 @@ func getFuncInt64(labelName string, defaultValue int64) func(application maratho
|
||||
return label.GetInt64ValueP(application.Labels, labelName, defaultValue)
|
||||
}
|
||||
}
|
||||
|
||||
func getFuncInt(labelName string, defaultValue int) func(application marathon.Application) int {
|
||||
return func(application marathon.Application) int {
|
||||
return label.GetIntValueP(application.Labels, labelName, defaultValue)
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
{{ if hasHealthCheckLabels $app }}
|
||||
[backends."{{getBackend $app $serviceName }}".healthCheck]
|
||||
path = "{{getHealthCheckPath $app }}"
|
||||
port = {{getHealthCheckPort $app}}
|
||||
interval = "{{getHealthCheckInterval $app }}"
|
||||
{{end}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user