feat(ecs): add whitelistSourceRange label.

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

View file

@ -40,6 +40,7 @@ func (p *Provider) buildConfiguration(services map[string][]ecsInstance) (*types
"hasMaxConnLabels": hasMaxConnLabels,
"getMaxConnAmount": getFuncFirstInt64Value(label.TraefikBackendMaxConnAmount, math.MaxInt64),
"getMaxConnExtractorFunc": getFuncFirstStringValue(label.TraefikBackendMaxConnExtractorFunc, label.DefaultBackendMaxconnExtractorFunc),
"getWhitelistSourceRange": getFuncSliceString(label.TraefikFrontendWhitelistSourceRange),
}
return p.GetConfiguration("templates/ecs.tmpl", ecsFuncMap, struct {
Services map[string][]ecsInstance

View file

@ -51,6 +51,12 @@
"{{.}}",
{{end}}]
{{if getWhitelistSourceRange .}}
whitelistSourceRange = [{{range getWhitelistSourceRange .}}
"{{.}}",
{{end}}]
{{end}}
basicAuth = [{{range getBasicAuth .}}
"{{.}}",
{{end}}]