feat(consulcatalog): add WhitelistSourceRange tags.
This commit is contained in:
parent
2fdefa258e
commit
c9b871a03a
2 changed files with 15 additions and 7 deletions
|
@ -39,13 +39,14 @@ func (p *CatalogProvider) buildConfiguration(catalog []catalogUpdate) *types.Con
|
||||||
"getMaxConn": p.getMaxConn,
|
"getMaxConn": p.getMaxConn,
|
||||||
|
|
||||||
// Frontend functions
|
// Frontend functions
|
||||||
"getFrontendRule": p.getFrontendRule,
|
"getFrontendRule": p.getFrontendRule,
|
||||||
"getBasicAuth": p.getFuncSliceAttribute(label.SuffixFrontendAuthBasic),
|
"getBasicAuth": p.getFuncSliceAttribute(label.SuffixFrontendAuthBasic),
|
||||||
"getEntryPoints": getEntryPoints, // Deprecated [breaking]
|
"getEntryPoints": getEntryPoints, // Deprecated [breaking]
|
||||||
"getFrontEndEntryPoints": p.getFuncSliceAttribute(label.SuffixFrontendEntryPoints), // TODO [breaking] rename to getEntryPoints when getEntryPoints will be removed
|
"getFrontEndEntryPoints": p.getFuncSliceAttribute(label.SuffixFrontendEntryPoints), // TODO [breaking] rename to getEntryPoints when getEntryPoints will be removed
|
||||||
"getPriority": p.getFuncIntAttribute(label.SuffixFrontendPriority, 0),
|
"getPriority": p.getFuncIntAttribute(label.SuffixFrontendPriority, 0),
|
||||||
"getPassHostHeader": p.getFuncBoolAttribute(label.SuffixFrontendPassHostHeader, true),
|
"getPassHostHeader": p.getFuncBoolAttribute(label.SuffixFrontendPassHostHeader, true),
|
||||||
"getPassTLSCert": p.getFuncBoolAttribute(label.SuffixFrontendPassTLSCert, label.DefaultPassTLSCert),
|
"getPassTLSCert": p.getFuncBoolAttribute(label.SuffixFrontendPassTLSCert, label.DefaultPassTLSCert),
|
||||||
|
"getWhitelistSourceRange": p.getFuncSliceAttribute(label.SuffixFrontendWhitelistSourceRange),
|
||||||
}
|
}
|
||||||
|
|
||||||
var allNodes []*api.ServiceEntry
|
var allNodes []*api.ServiceEntry
|
||||||
|
|
|
@ -48,6 +48,13 @@
|
||||||
"{{.}}",
|
"{{.}}",
|
||||||
{{end}}]
|
{{end}}]
|
||||||
|
|
||||||
|
{{ $whitelistSourceRange := getWhitelistSourceRange $service.Attributes }}
|
||||||
|
{{if $whitelistSourceRange }}
|
||||||
|
whitelistSourceRange = [{{range $whitelistSourceRange}}
|
||||||
|
"{{.}}",
|
||||||
|
{{end}}]
|
||||||
|
{{end}}
|
||||||
|
|
||||||
basicAuth = [{{range getBasicAuth $service.Attributes }}
|
basicAuth = [{{range getBasicAuth $service.Attributes }}
|
||||||
"{{.}}",
|
"{{.}}",
|
||||||
{{end}}]
|
{{end}}]
|
||||||
|
|
Loading…
Reference in a new issue