Skip to content

Commit 789e5fc

Browse files
howardjohnistio-testing
authored andcommitted
Drop SupportedFeatures from gateway-api
This field provides no value but causes a lot of harm: * kubernetes-sigs/gateway-api#3200 (comment) * istio#50851
1 parent ec0ec16 commit 789e5fc

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

pilot/pkg/config/kube/gateway/conversion.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ func createGRPCURIMatch(match k8s.GRPCRouteMatch) (*istio.StringMatch, *ConfigEr
18651865

18661866
// getGatewayClass finds all gateway class that are owned by Istio
18671867
// Response is ClassName -> Controller type
1868-
func getGatewayClasses(r GatewayResources, supportedFeatures []k8s.SupportedFeature) map[string]k8s.GatewayController {
1868+
func getGatewayClasses(r GatewayResources) map[string]k8s.GatewayController {
18691869
res := map[string]k8s.GatewayController{}
18701870
// Setup builtin ones - these can be overridden possibly
18711871
for name, controller := range builtinClasses {
@@ -1883,7 +1883,6 @@ func getGatewayClasses(r GatewayResources, supportedFeatures []k8s.SupportedFeat
18831883
obj.Status.(*kstatus.WrappedStatus).Mutate(func(s config.Status) config.Status {
18841884
gcs := s.(*k8s.GatewayClassStatus)
18851885
*gcs = GetClassStatus(gcs, obj.Generation)
1886-
gcs.SupportedFeatures = supportedFeatures
18871886
return gcs
18881887
})
18891888
}
@@ -2032,7 +2031,7 @@ func convertGateways(r configContext) ([]config.Config, map[parentKey][]*parentI
20322031
// namespaceLabelReferences keeps track of all namespace label keys referenced by Gateways. This is
20332032
// used to ensure we handle namespace updates for those keys.
20342033
namespaceLabelReferences := sets.New[string]()
2035-
classes := getGatewayClasses(r.GatewayResources, gatewaySupportedFeatures)
2034+
classes := getGatewayClasses(r.GatewayResources)
20362035
for _, obj := range r.Gateway {
20372036
obj := obj
20382037
kgw := obj.Spec.(*k8s.GatewaySpec)

pilot/pkg/config/kube/gateway/supported_features.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,7 @@
1515
package gateway
1616

1717
import (
18-
k8sv1 "sigs.k8s.io/gateway-api/apis/v1"
1918
"sigs.k8s.io/gateway-api/pkg/features"
20-
21-
"istio.io/istio/pkg/util/sets"
2219
)
2320

2421
var SupportedFeatures = features.AllFeatures
25-
26-
var gatewaySupportedFeatures = getSupportedFeatures()
27-
28-
func getSupportedFeatures() []k8sv1.SupportedFeature {
29-
ret := sets.New[k8sv1.SupportedFeature]()
30-
for _, feature := range SupportedFeatures.UnsortedList() {
31-
ret.Insert(k8sv1.SupportedFeature(feature))
32-
}
33-
return sets.SortedList(ret)
34-
}

0 commit comments

Comments
 (0)