diff --git a/provider/marathon/config.go b/provider/marathon/config.go index 8c2e88321..034099d26 100644 --- a/provider/marathon/config.go +++ b/provider/marathon/config.go @@ -27,6 +27,7 @@ func (p *Provider) buildConfiguration() *types.Configuration { "getSubDomain": p.getSubDomain, // FIXME DEAD ? "getProtocol": getFuncStringService(label.TraefikProtocol, label.DefaultProtocol), "getPassHostHeader": getFuncStringService(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeader), + "getPassTLSCert": getFuncBoolService(label.TraefikFrontendPassTLSCert, label.DefaultPassTLSCert), "getPriority": getFuncStringService(label.TraefikFrontendPriority, label.DefaultFrontendPriority), "getEntryPoints": getFuncSliceStringService(label.TraefikFrontendEntryPoints), "getFrontendRule": p.getFrontendRule, @@ -397,6 +398,14 @@ func getFuncStringService(labelName string, defaultValue string) func(applicatio } } +func getFuncBoolService(labelName string, defaultValue bool) func(application marathon.Application, serviceName string) bool { + return func(application marathon.Application, serviceName string) bool { + labels := getLabels(application, serviceName) + lbName := getLabelName(serviceName, labelName) + return label.GetBoolValue(labels, lbName, defaultValue) + } +} + func getFuncSliceStringService(labelName string) func(application marathon.Application, serviceName string) []string { return func(application marathon.Application, serviceName string) []string { labels := getLabels(application, serviceName) diff --git a/templates/marathon.tmpl b/templates/marathon.tmpl index 5154637e7..98db186eb 100644 --- a/templates/marathon.tmpl +++ b/templates/marathon.tmpl @@ -56,6 +56,7 @@ backend = "{{getBackend $app $serviceName}}" priority = {{getPriority $app $serviceName}} passHostHeader = {{getPassHostHeader $app $serviceName}} + passTLSCert = {{getPassTLSCert $app $serviceName}} entryPoints = [{{range getEntryPoints $app $serviceName}} "{{.}}",