Skip to content

Commit 8db6a6b

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 75a54ba commit 8db6a6b

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
@@ -1862,7 +1862,7 @@ func createGRPCURIMatch(match k8s.GRPCRouteMatch) (*istio.StringMatch, *ConfigEr
18621862

18631863
// getGatewayClass finds all gateway class that are owned by Istio
18641864
// Response is ClassName -> Controller type
1865-
func getGatewayClasses(r GatewayResources, supportedFeatures []k8s.SupportedFeature) map[string]k8s.GatewayController {
1865+
func getGatewayClasses(r GatewayResources) map[string]k8s.GatewayController {
18661866
res := map[string]k8s.GatewayController{}
18671867
// Setup builtin ones - these can be overridden possibly
18681868
for name, controller := range builtinClasses {
@@ -1880,7 +1880,6 @@ func getGatewayClasses(r GatewayResources, supportedFeatures []k8s.SupportedFeat
18801880
obj.Status.(*kstatus.WrappedStatus).Mutate(func(s config.Status) config.Status {
18811881
gcs := s.(*k8s.GatewayClassStatus)
18821882
*gcs = GetClassStatus(gcs, obj.Generation)
1883-
gcs.SupportedFeatures = supportedFeatures
18841883
return gcs
18851884
})
18861885
}
@@ -2029,7 +2028,7 @@ func convertGateways(r configContext) ([]config.Config, map[parentKey][]*parentI
20292028
// namespaceLabelReferences keeps track of all namespace label keys referenced by Gateways. This is
20302029
// used to ensure we handle namespace updates for those keys.
20312030
namespaceLabelReferences := sets.New[string]()
2032-
classes := getGatewayClasses(r.GatewayResources, gatewaySupportedFeatures)
2031+
classes := getGatewayClasses(r.GatewayResources)
20332032
for _, obj := range r.Gateway {
20342033
obj := obj
20352034
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)