Skip to content

Commit 7babca9

Browse files
authored
fix: Unsupported listener protocol type error for nil supportKinds assign gateway status. (#4345)
1 parent 14830c7 commit 7babca9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

internal/gatewayapi/listener.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
7474
case gwapiv1.UDPProtocolType:
7575
t.validateAllowedRoutes(listener, resource.KindUDPRoute)
7676
default:
77+
listener.SetSupportedKinds(gwapiv1.RouteGroupKind{Kind: "InvalidKind"})
7778
status.SetGatewayListenerStatusCondition(listener.gateway.Gateway,
7879
listener.listenerStatusIdx,
7980
gwapiv1.ListenerConditionAccepted,

internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ gateways:
3434
status: "True"
3535
type: ResolvedRefs
3636
name: unsupported
37-
supportedKinds: null
37+
supportedKinds:
38+
- kind: InvalidKind
3839
httpRoutes:
3940
- apiVersion: gateway.networking.k8s.io/v1
4041
kind: HTTPRoute

0 commit comments

Comments
 (0)