Skip to content

Commit

Permalink
fix: Unsupported listener protocol type error for nil supportKinds as…
Browse files Browse the repository at this point in the history
…sign gateway status. (#4345)
  • Loading branch information
qicz authored Sep 27, 2024
1 parent 14830c7 commit 7babca9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/gatewayapi/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7babca9

Please sign in to comment.