Skip to content

Commit ed37370

Browse files
authored
Merge pull request kubernetes#126786 from thockin/remove_AllowServiceLBStatusOnNonLB_gate
Remove AllowServiceLBStatusOnNonLB gate
2 parents 2ecff6d + 128e189 commit ed37370

File tree

4 files changed

+2
-32
lines changed

4 files changed

+2
-32
lines changed

pkg/apis/core/validation/validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7476,7 +7476,7 @@ var (
74767476
func ValidateLoadBalancerStatus(status *core.LoadBalancerStatus, fldPath *field.Path, spec *core.ServiceSpec) field.ErrorList {
74777477
allErrs := field.ErrorList{}
74787478
ingrPath := fldPath.Child("ingress")
7479-
if !utilfeature.DefaultFeatureGate.Enabled(features.AllowServiceLBStatusOnNonLB) && spec.Type != core.ServiceTypeLoadBalancer && len(status.Ingress) != 0 {
7479+
if spec.Type != core.ServiceTypeLoadBalancer && len(status.Ingress) != 0 {
74807480
allErrs = append(allErrs, field.Forbidden(ingrPath, "may only be used when `spec.type` is 'LoadBalancer'"))
74817481
} else {
74827482
for i, ingress := range status.Ingress {

pkg/apis/core/validation/validation_test.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24048,14 +24048,12 @@ func TestValidateLoadBalancerStatus(t *testing.T) {
2404824048
testCases := []struct {
2404924049
name string
2405024050
ipModeEnabled bool
24051-
nonLBAllowed bool
2405224051
tweakLBStatus func(s *core.LoadBalancerStatus)
2405324052
tweakSvcSpec func(s *core.ServiceSpec)
2405424053
numErrs int
2405524054
}{
2405624055
{
24057-
name: "type is not LB",
24058-
nonLBAllowed: false,
24056+
name: "type is not LB",
2405924057
tweakSvcSpec: func(s *core.ServiceSpec) {
2406024058
s.Type = core.ServiceTypeClusterIP
2406124059
},
@@ -24065,18 +24063,6 @@ func TestValidateLoadBalancerStatus(t *testing.T) {
2406524063
}}
2406624064
},
2406724065
numErrs: 1,
24068-
}, {
24069-
name: "type is not LB. back-compat",
24070-
nonLBAllowed: true,
24071-
tweakSvcSpec: func(s *core.ServiceSpec) {
24072-
s.Type = core.ServiceTypeClusterIP
24073-
},
24074-
tweakLBStatus: func(s *core.LoadBalancerStatus) {
24075-
s.Ingress = []core.LoadBalancerIngress{{
24076-
IP: "1.2.3.4",
24077-
}}
24078-
},
24079-
numErrs: 0,
2408024066
}, {
2408124067
name: "valid vip ipMode",
2408224068
ipModeEnabled: true,
@@ -24139,7 +24125,6 @@ func TestValidateLoadBalancerStatus(t *testing.T) {
2413924125
for _, tc := range testCases {
2414024126
t.Run(tc.name, func(t *testing.T) {
2414124127
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.LoadBalancerIPMode, tc.ipModeEnabled)
24142-
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AllowServiceLBStatusOnNonLB, tc.nonLBAllowed)
2414324128
status := core.LoadBalancerStatus{}
2414424129
tc.tweakLBStatus(&status)
2414524130
spec := core.ServiceSpec{Type: core.ServiceTypeLoadBalancer}

pkg/features/kube_features.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ const (
5252
// with DNS names.
5353
AllowDNSOnlyNodeCSR featuregate.Feature = "AllowDNSOnlyNodeCSR"
5454

55-
// owner: @thockin
56-
// deprecated: v1.29
57-
//
58-
// Enables Service.status.ingress.loadBanace to be set on
59-
// services of types other than LoadBalancer.
60-
AllowServiceLBStatusOnNonLB featuregate.Feature = "AllowServiceLBStatusOnNonLB"
61-
6255
// owner: @bswartz
6356
// alpha: v1.18
6457
// beta: v1.24
@@ -989,8 +982,6 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
989982

990983
AllowDNSOnlyNodeCSR: {Default: false, PreRelease: featuregate.Deprecated}, // remove after 1.33
991984

992-
AllowServiceLBStatusOnNonLB: {Default: false, PreRelease: featuregate.Deprecated}, // remove after 1.29
993-
994985
AnyVolumeDataSource: {Default: true, PreRelease: featuregate.Beta}, // on by default in 1.24
995986

996987
AppArmor: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.33

test/featuregates_linter/test_data/unversioned_feature_list.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
lockToDefault: false
2323
preRelease: Deprecated
2424
version: ""
25-
- name: AllowServiceLBStatusOnNonLB
26-
versionedSpecs:
27-
- default: false
28-
lockToDefault: false
29-
preRelease: Deprecated
30-
version: ""
3125
- name: AnonymousAuthConfigurableEndpoints
3226
versionedSpecs:
3327
- default: false

0 commit comments

Comments
 (0)