Server weight zero
This commit is contained in:
parent
edbcd01fbc
commit
8168d2fdc1
84 changed files with 378 additions and 273 deletions
|
@ -17,19 +17,21 @@ const (
|
|||
|
||||
// Default values
|
||||
const (
|
||||
DefaultWeight = "0" // TODO [breaking] use int value
|
||||
DefaultWeightInt = 0 // TODO rename to DefaultWeight
|
||||
DefaultWeight = 1
|
||||
DefaultProtocol = "http"
|
||||
DefaultPassHostHeader = "true" // TODO [breaking] use bool value
|
||||
DefaultPassHostHeaderBool = true // TODO rename to DefaultPassHostHeader
|
||||
DefaultPassHostHeader = true
|
||||
DefaultPassTLSCert = false
|
||||
DefaultFrontendPriority = "0" // TODO [breaking] int value
|
||||
DefaultFrontendPriorityInt = 0 // TODO rename to DefaultFrontendPriority
|
||||
DefaultFrontendPriority = 0
|
||||
DefaultCircuitBreakerExpression = "NetworkErrorRatio() > 1"
|
||||
DefaultBackendLoadBalancerMethod = "wrr"
|
||||
DefaultBackendMaxconnExtractorFunc = "request.host"
|
||||
DefaultBackendLoadbalancerStickinessCookieName = ""
|
||||
DefaultBackendHealthCheckPort = 0
|
||||
|
||||
// TODO need to be remove in extra-service-fabric
|
||||
DefaultWeightInt = 1 // Deprecated
|
||||
DefaultPassHostHeaderBool = true // Deprecated
|
||||
DefaultFrontendPriorityInt = 0 // Deprecated
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -602,17 +602,17 @@ func TestGetFuncString(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
labels: nil,
|
||||
labelName: TraefikWeight,
|
||||
defaultValue: DefaultWeight,
|
||||
expected: "0",
|
||||
labelName: TraefikProtocol,
|
||||
defaultValue: DefaultProtocol,
|
||||
expected: "http",
|
||||
},
|
||||
{
|
||||
labels: map[string]string{
|
||||
TraefikWeight: "10",
|
||||
TraefikProtocol: "https",
|
||||
},
|
||||
labelName: TraefikWeight,
|
||||
defaultValue: DefaultWeight,
|
||||
expected: "10",
|
||||
labelName: TraefikProtocol,
|
||||
defaultValue: DefaultProtocol,
|
||||
expected: "https",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue