feat(ecs): add PassTLSCert label.

This commit is contained in:
Fernandez Ludovic 2017-12-16 20:00:36 +01:00 committed by Traefiker
parent 7c64f5d31e
commit c3d5ad2eeb
2 changed files with 8 additions and 0 deletions

View file

@ -28,6 +28,7 @@ func (p *Provider) buildConfiguration(services map[string][]ecsInstance) (*types
"getPort": getPort,
"getWeight": getFuncStringValue(label.TraefikWeight, label.DefaultWeight),
"getPassHostHeader": getFuncStringValue(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeader),
"getPassTLSCert": getFuncBoolValue(label.TraefikFrontendPassTLSCert, label.DefaultPassTLSCert),
"getPriority": getFuncStringValue(label.TraefikFrontendPriority, label.DefaultFrontendPriority),
"getEntryPoints": getFuncSliceString(label.TraefikFrontendEntryPoints),
"hasHealthCheckLabels": hasFuncFirst(label.TraefikBackendHealthCheckPath),
@ -107,6 +108,12 @@ func getFuncStringValue(labelName string, defaultValue string) func(i ecsInstanc
}
}
func getFuncBoolValue(labelName string, defaultValue bool) func(i ecsInstance) bool {
return func(i ecsInstance) bool {
return getBoolValue(i, labelName, defaultValue)
}
}
func getFuncSliceString(labelName string) func(i ecsInstance) []string {
return func(i ecsInstance) []string {
return getSliceString(i, labelName)

View file

@ -45,6 +45,7 @@
backend = "backend-{{ $serviceName }}"
priority = {{ getPriority .}}
passHostHeader = {{ getPassHostHeader .}}
passTLSCert = {{ getPassTLSCert .}}
entryPoints = [{{range getEntryPoints .}}
"{{.}}",