Skip to content

Commit

Permalink
Drop SupportedFeatures from gateway-api
Browse files Browse the repository at this point in the history
This field provides no value but causes a lot of harm:
* kubernetes-sigs/gateway-api#3200 (comment)
* istio#50851
  • Loading branch information
howardjohn authored and istio-testing committed Jul 22, 2024
1 parent ec0ec16 commit 789e5fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
5 changes: 2 additions & 3 deletions pilot/pkg/config/kube/gateway/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ func createGRPCURIMatch(match k8s.GRPCRouteMatch) (*istio.StringMatch, *ConfigEr

// getGatewayClass finds all gateway class that are owned by Istio
// Response is ClassName -> Controller type
func getGatewayClasses(r GatewayResources, supportedFeatures []k8s.SupportedFeature) map[string]k8s.GatewayController {
func getGatewayClasses(r GatewayResources) map[string]k8s.GatewayController {
res := map[string]k8s.GatewayController{}
// Setup builtin ones - these can be overridden possibly
for name, controller := range builtinClasses {
Expand All @@ -1883,7 +1883,6 @@ func getGatewayClasses(r GatewayResources, supportedFeatures []k8s.SupportedFeat
obj.Status.(*kstatus.WrappedStatus).Mutate(func(s config.Status) config.Status {
gcs := s.(*k8s.GatewayClassStatus)
*gcs = GetClassStatus(gcs, obj.Generation)
gcs.SupportedFeatures = supportedFeatures
return gcs
})
}
Expand Down Expand Up @@ -2032,7 +2031,7 @@ func convertGateways(r configContext) ([]config.Config, map[parentKey][]*parentI
// namespaceLabelReferences keeps track of all namespace label keys referenced by Gateways. This is
// used to ensure we handle namespace updates for those keys.
namespaceLabelReferences := sets.New[string]()
classes := getGatewayClasses(r.GatewayResources, gatewaySupportedFeatures)
classes := getGatewayClasses(r.GatewayResources)
for _, obj := range r.Gateway {
obj := obj
kgw := obj.Spec.(*k8s.GatewaySpec)
Expand Down
13 changes: 0 additions & 13 deletions pilot/pkg/config/kube/gateway/supported_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,7 @@
package gateway

import (
k8sv1 "sigs.k8s.io/gateway-api/apis/v1"
"sigs.k8s.io/gateway-api/pkg/features"

"istio.io/istio/pkg/util/sets"
)

var SupportedFeatures = features.AllFeatures

var gatewaySupportedFeatures = getSupportedFeatures()

func getSupportedFeatures() []k8sv1.SupportedFeature {
ret := sets.New[k8sv1.SupportedFeature]()
for _, feature := range SupportedFeatures.UnsortedList() {
ret.Insert(k8sv1.SupportedFeature(feature))
}
return sets.SortedList(ret)
}

0 comments on commit 789e5fc

Please sign in to comment.