Use prefix for sticky and stickiness tags.
This commit is contained in:
parent
9a7821b8fa
commit
75533b2beb
2 changed files with 70 additions and 67 deletions
|
@ -430,7 +430,7 @@ func (p *CatalogProvider) getBasicAuth(tags []string) []string {
|
|||
}
|
||||
|
||||
func (p *CatalogProvider) getSticky(tags []string) string {
|
||||
stickyTag := p.getTag(types.LabelBackendLoadbalancerSticky, tags, "")
|
||||
stickyTag := p.getAttribute(types.SuffixBackendLoadBalancerSticky, tags, "")
|
||||
if len(stickyTag) > 0 {
|
||||
log.Warnf("Deprecated configuration found: %s. Please use %s.", types.LabelBackendLoadbalancerSticky, types.LabelBackendLoadbalancerStickiness)
|
||||
} else {
|
||||
|
@ -440,12 +440,12 @@ func (p *CatalogProvider) getSticky(tags []string) string {
|
|||
}
|
||||
|
||||
func (p *CatalogProvider) hasStickinessLabel(tags []string) bool {
|
||||
stickinessTag := p.getTag(types.LabelBackendLoadbalancerStickiness, tags, "")
|
||||
stickinessTag := p.getAttribute(types.SuffixBackendLoadBalancerStickiness, tags, "")
|
||||
return len(stickinessTag) > 0 && strings.EqualFold(strings.TrimSpace(stickinessTag), "true")
|
||||
}
|
||||
|
||||
func (p *CatalogProvider) getStickinessCookieName(tags []string) string {
|
||||
return p.getTag(types.LabelBackendLoadbalancerStickinessCookieName, tags, "")
|
||||
return p.getAttribute(types.SuffixBackendLoadBalancerStickinessCookieName, tags, "")
|
||||
}
|
||||
|
||||
func (p *CatalogProvider) getAttribute(name string, tags []string, defaultValue string) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue