forked from Ivasoft/traefik
feat(ecs): add whitelistSourceRange label.
This commit is contained in:
committed by
Traefiker
parent
c3d5ad2eeb
commit
e45e63dc37
@@ -40,6 +40,7 @@ func (p *Provider) buildConfiguration(services map[string][]ecsInstance) (*types
|
|||||||
"hasMaxConnLabels": hasMaxConnLabels,
|
"hasMaxConnLabels": hasMaxConnLabels,
|
||||||
"getMaxConnAmount": getFuncFirstInt64Value(label.TraefikBackendMaxConnAmount, math.MaxInt64),
|
"getMaxConnAmount": getFuncFirstInt64Value(label.TraefikBackendMaxConnAmount, math.MaxInt64),
|
||||||
"getMaxConnExtractorFunc": getFuncFirstStringValue(label.TraefikBackendMaxConnExtractorFunc, label.DefaultBackendMaxconnExtractorFunc),
|
"getMaxConnExtractorFunc": getFuncFirstStringValue(label.TraefikBackendMaxConnExtractorFunc, label.DefaultBackendMaxconnExtractorFunc),
|
||||||
|
"getWhitelistSourceRange": getFuncSliceString(label.TraefikFrontendWhitelistSourceRange),
|
||||||
}
|
}
|
||||||
return p.GetConfiguration("templates/ecs.tmpl", ecsFuncMap, struct {
|
return p.GetConfiguration("templates/ecs.tmpl", ecsFuncMap, struct {
|
||||||
Services map[string][]ecsInstance
|
Services map[string][]ecsInstance
|
||||||
|
|||||||
@@ -51,6 +51,12 @@
|
|||||||
"{{.}}",
|
"{{.}}",
|
||||||
{{end}}]
|
{{end}}]
|
||||||
|
|
||||||
|
{{if getWhitelistSourceRange .}}
|
||||||
|
whitelistSourceRange = [{{range getWhitelistSourceRange .}}
|
||||||
|
"{{.}}",
|
||||||
|
{{end}}]
|
||||||
|
{{end}}
|
||||||
|
|
||||||
basicAuth = [{{range getBasicAuth .}}
|
basicAuth = [{{range getBasicAuth .}}
|
||||||
"{{.}}",
|
"{{.}}",
|
||||||
{{end}}]
|
{{end}}]
|
||||||
|
|||||||
Reference in New Issue
Block a user