mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
provider/azure: Fix load balancer distribution constants
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
This commit is contained in:
parent
77a41043a5
commit
1e06b6ecad
@ -1005,9 +1005,9 @@ func (az *Cloud) reconcileLoadBalancerRule(
|
||||
})
|
||||
}
|
||||
|
||||
loadDistribution := network.Default
|
||||
loadDistribution := network.LoadDistributionDefault
|
||||
if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP {
|
||||
loadDistribution = network.SourceIP
|
||||
loadDistribution = network.LoadDistributionSourceIP
|
||||
}
|
||||
|
||||
expectedRule := network.LoadBalancingRule{
|
||||
|
@ -176,14 +176,14 @@ func TestFindRule(t *testing.T) {
|
||||
{
|
||||
Name: to.StringPtr("probe1"),
|
||||
LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{
|
||||
LoadDistribution: network.SourceIP,
|
||||
LoadDistribution: network.LoadDistributionSourceIP,
|
||||
},
|
||||
},
|
||||
},
|
||||
curRule: network.LoadBalancingRule{
|
||||
Name: to.StringPtr("probe2"),
|
||||
LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{
|
||||
LoadDistribution: network.SourceIP,
|
||||
LoadDistribution: network.LoadDistributionSourceIP,
|
||||
},
|
||||
},
|
||||
expected: false,
|
||||
@ -196,7 +196,7 @@ func TestFindRule(t *testing.T) {
|
||||
LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{
|
||||
BackendPort: to.Int32Ptr(2),
|
||||
FrontendPort: to.Int32Ptr(2),
|
||||
LoadDistribution: network.SourceIP,
|
||||
LoadDistribution: network.LoadDistributionSourceIP,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -205,7 +205,7 @@ func TestFindRule(t *testing.T) {
|
||||
LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{
|
||||
BackendPort: to.Int32Ptr(2),
|
||||
FrontendPort: to.Int32Ptr(2),
|
||||
LoadDistribution: network.SourceIP,
|
||||
LoadDistribution: network.LoadDistributionSourceIP,
|
||||
},
|
||||
},
|
||||
expected: true,
|
||||
|
@ -709,7 +709,7 @@ func TestServiceDefaultsToNoSessionPersistence(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if lbRule.LoadDistribution != network.Default {
|
||||
if lbRule.LoadDistribution != network.LoadDistributionDefault {
|
||||
t.Errorf("Expected LB rule to have default load distribution but was %s", lbRule.LoadDistribution)
|
||||
}
|
||||
}
|
||||
@ -732,7 +732,7 @@ func TestServiceRespectsNoSessionAffinity(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if lbRule.LoadDistribution != network.Default {
|
||||
if lbRule.LoadDistribution != network.LoadDistributionDefault {
|
||||
t.Errorf("Expected LB rule to have default load distribution but was %s", lbRule.LoadDistribution)
|
||||
}
|
||||
}
|
||||
@ -755,7 +755,7 @@ func TestServiceRespectsClientIPSessionAffinity(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if lbRule.LoadDistribution != network.SourceIP {
|
||||
if lbRule.LoadDistribution != network.LoadDistributionSourceIP {
|
||||
t.Errorf("Expected LB rule to have SourceIP load distribution but was %s", lbRule.LoadDistribution)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user