mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Remove AllowServiceLBStatusOnNonLB gate
This commit is contained in:
@@ -24048,14 +24048,12 @@ func TestValidateLoadBalancerStatus(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
ipModeEnabled bool
|
||||
nonLBAllowed bool
|
||||
tweakLBStatus func(s *core.LoadBalancerStatus)
|
||||
tweakSvcSpec func(s *core.ServiceSpec)
|
||||
numErrs int
|
||||
}{
|
||||
{
|
||||
name: "type is not LB",
|
||||
nonLBAllowed: false,
|
||||
name: "type is not LB",
|
||||
tweakSvcSpec: func(s *core.ServiceSpec) {
|
||||
s.Type = core.ServiceTypeClusterIP
|
||||
},
|
||||
@@ -24065,18 +24063,6 @@ func TestValidateLoadBalancerStatus(t *testing.T) {
|
||||
}}
|
||||
},
|
||||
numErrs: 1,
|
||||
}, {
|
||||
name: "type is not LB. back-compat",
|
||||
nonLBAllowed: true,
|
||||
tweakSvcSpec: func(s *core.ServiceSpec) {
|
||||
s.Type = core.ServiceTypeClusterIP
|
||||
},
|
||||
tweakLBStatus: func(s *core.LoadBalancerStatus) {
|
||||
s.Ingress = []core.LoadBalancerIngress{{
|
||||
IP: "1.2.3.4",
|
||||
}}
|
||||
},
|
||||
numErrs: 0,
|
||||
}, {
|
||||
name: "valid vip ipMode",
|
||||
ipModeEnabled: true,
|
||||
@@ -24139,7 +24125,6 @@ func TestValidateLoadBalancerStatus(t *testing.T) {
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.LoadBalancerIPMode, tc.ipModeEnabled)
|
||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AllowServiceLBStatusOnNonLB, tc.nonLBAllowed)
|
||||
status := core.LoadBalancerStatus{}
|
||||
tc.tweakLBStatus(&status)
|
||||
spec := core.ServiceSpec{Type: core.ServiceTypeLoadBalancer}
|
||||
|
||||
Reference in New Issue
Block a user