Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/gatewayapi/contexts.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ type ListenerContext struct {
}

func (l *ListenerContext) SetSupportedKinds(kinds ...gwapiv1.RouteGroupKind) {
l.gateway.Status.Listeners[l.listenerStatusIdx].SupportedKinds = kinds
l.gateway.Status.Listeners[l.listenerStatusIdx].SupportedKinds = make([]gwapiv1.RouteGroupKind, 0, len(kinds))
l.gateway.Status.Listeners[l.listenerStatusIdx].SupportedKinds = append(l.gateway.Status.Listeners[l.listenerStatusIdx].SupportedKinds, kinds...)
}

func (l *ListenerContext) IncrementAttachedRoutes() {
Expand Down
2 changes: 1 addition & 1 deletion internal/gatewayapi/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +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"})
listener.SetSupportedKinds()
status.SetGatewayListenerStatusCondition(listener.gateway.Gateway,
listener.listenerStatusIdx,
gwapiv1.ListenerConditionAccepted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ gateways:
status: "True"
type: ResolvedRefs
name: unsupported
supportedKinds:
- kind: InvalidKind
supportedKinds: []
httpRoutes:
- apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
Expand Down