feat(ecs): add PassTLSCert label.
This commit is contained in:
parent
7c64f5d31e
commit
c3d5ad2eeb
2 changed files with 8 additions and 0 deletions
|
@ -28,6 +28,7 @@ func (p *Provider) buildConfiguration(services map[string][]ecsInstance) (*types
|
||||||
"getPort": getPort,
|
"getPort": getPort,
|
||||||
"getWeight": getFuncStringValue(label.TraefikWeight, label.DefaultWeight),
|
"getWeight": getFuncStringValue(label.TraefikWeight, label.DefaultWeight),
|
||||||
"getPassHostHeader": getFuncStringValue(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeader),
|
"getPassHostHeader": getFuncStringValue(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeader),
|
||||||
|
"getPassTLSCert": getFuncBoolValue(label.TraefikFrontendPassTLSCert, label.DefaultPassTLSCert),
|
||||||
"getPriority": getFuncStringValue(label.TraefikFrontendPriority, label.DefaultFrontendPriority),
|
"getPriority": getFuncStringValue(label.TraefikFrontendPriority, label.DefaultFrontendPriority),
|
||||||
"getEntryPoints": getFuncSliceString(label.TraefikFrontendEntryPoints),
|
"getEntryPoints": getFuncSliceString(label.TraefikFrontendEntryPoints),
|
||||||
"hasHealthCheckLabels": hasFuncFirst(label.TraefikBackendHealthCheckPath),
|
"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 {
|
func getFuncSliceString(labelName string) func(i ecsInstance) []string {
|
||||||
return func(i ecsInstance) []string {
|
return func(i ecsInstance) []string {
|
||||||
return getSliceString(i, labelName)
|
return getSliceString(i, labelName)
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
backend = "backend-{{ $serviceName }}"
|
backend = "backend-{{ $serviceName }}"
|
||||||
priority = {{ getPriority .}}
|
priority = {{ getPriority .}}
|
||||||
passHostHeader = {{ getPassHostHeader .}}
|
passHostHeader = {{ getPassHostHeader .}}
|
||||||
|
passTLSCert = {{ getPassTLSCert .}}
|
||||||
|
|
||||||
entryPoints = [{{range getEntryPoints .}}
|
entryPoints = [{{range getEntryPoints .}}
|
||||||
"{{.}}",
|
"{{.}}",
|
||||||
|
|
Loading…
Reference in a new issue