1
0
Fork 0

Server weight zero

This commit is contained in:
Ludovic Fernandez 2018-04-11 16:30:04 +02:00 committed by Traefiker Bot
parent edbcd01fbc
commit 8168d2fdc1
84 changed files with 378 additions and 273 deletions

View file

@ -39,8 +39,8 @@ func (p *Provider) buildConfigurationV2(catalog []catalogUpdate) *types.Configur
"getFrontendRule": p.getFrontendRule,
"getBasicAuth": label.GetFuncSliceString(label.TraefikFrontendAuthBasic),
"getFrontEndEntryPoints": label.GetFuncSliceString(label.TraefikFrontendEntryPoints),
"getPriority": label.GetFuncInt(label.TraefikFrontendPriority, label.DefaultFrontendPriorityInt),
"getPassHostHeader": label.GetFuncBool(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeaderBool),
"getPriority": label.GetFuncInt(label.TraefikFrontendPriority, label.DefaultFrontendPriority),
"getPassHostHeader": label.GetFuncBool(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeader),
"getPassTLSCert": label.GetFuncBool(label.TraefikFrontendPassTLSCert, label.DefaultPassTLSCert),
"getWhiteList": label.GetWhiteList,
"getRedirect": label.GetRedirect,
@ -192,7 +192,7 @@ func getServerName(node *api.ServiceEntry, index int) string {
}
func (p *Provider) getWeight(tags []string) int {
weight := p.getIntAttribute(label.SuffixWeight, tags, label.DefaultWeightInt)
weight := p.getIntAttribute(label.SuffixWeight, tags, label.DefaultWeight)
// Deprecated
deprecatedWeightTag := "backend." + label.SuffixWeight
@ -200,7 +200,7 @@ func (p *Provider) getWeight(tags []string) int {
log.Warnf("Deprecated configuration found: %s. Please use %s.",
p.getPrefixedName(deprecatedWeightTag), p.getPrefixedName(label.SuffixWeight))
weight = p.getIntAttribute(deprecatedWeightTag, tags, label.DefaultWeightInt)
weight = p.getIntAttribute(deprecatedWeightTag, tags, label.DefaultWeight)
}
return weight