Remove Deprecated Step 1

This commit is contained in:
Jean-Baptiste Doumenjou 2018-07-31 19:28:03 +02:00 committed by Traefiker Bot
parent 1d53077fc7
commit 8627256e74
68 changed files with 168 additions and 1695 deletions

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/containous/flaeg"
"github.com/containous/flaeg/parse"
"github.com/containous/traefik/log"
"github.com/containous/traefik/types"
)
@ -218,7 +218,7 @@ func ParseRateSets(labels map[string]string, labelPrefix string, labelRegex *reg
switch submatch[2] {
case "period":
var d flaeg.Duration
var d parse.Duration
err := d.Set(rawValue)
if err != nil {
log.Errorf("Unable to parse %q: %q. %v", lblName, rawValue, err)
@ -354,7 +354,6 @@ func GetLoadBalancer(labels map[string]string) *types.LoadBalancer {
lb := &types.LoadBalancer{
Method: method,
Sticky: getSticky(labels),
}
if GetBoolValue(labels, TraefikBackendLoadBalancerStickiness, false) {
@ -364,14 +363,3 @@ func GetLoadBalancer(labels map[string]string) *types.LoadBalancer {
return lb
}
// TODO: Deprecated
// replaced by Stickiness
// Deprecated
func getSticky(labels map[string]string) bool {
if Has(labels, TraefikBackendLoadBalancerSticky) {
log.Warnf("Deprecated configuration found: %s. Please use %s.", TraefikBackendLoadBalancerSticky, TraefikBackendLoadBalancerStickiness)
}
return GetBoolValue(labels, TraefikBackendLoadBalancerSticky, false)
}