diff --git a/internal/gatewayapi/listener.go b/internal/gatewayapi/listener.go index 88667b8ef6d..10c00578d6e 100644 --- a/internal/gatewayapi/listener.go +++ b/internal/gatewayapi/listener.go @@ -74,6 +74,7 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource case gwapiv1.UDPProtocolType: t.validateAllowedRoutes(listener, resource.KindUDPRoute) default: + listener.SetSupportedKinds(gwapiv1.RouteGroupKind{Kind: "InvalidKind"}) status.SetGatewayListenerStatusCondition(listener.gateway.Gateway, listener.listenerStatusIdx, gwapiv1.ListenerConditionAccepted, diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml index 123a0171cb6..373c2f894ca 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml @@ -34,7 +34,8 @@ gateways: status: "True" type: ResolvedRefs name: unsupported - supportedKinds: null + supportedKinds: + - kind: InvalidKind httpRoutes: - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute