diff --git a/internal/controllers/gateway/route_utils.go b/internal/controllers/gateway/route_utils.go index 5d97b69766e..40727b9a95f 100644 --- a/internal/controllers/gateway/route_utils.go +++ b/internal/controllers/gateway/route_utils.go @@ -86,6 +86,9 @@ const ( RouteReasonNoMatchingParent gatewayv1beta1.RouteConditionReason = "NoMatchingParent" // This reason is used with the "Accepted" condition when no hostnames in listeners // could match hostname in the spec of route. + // NOTE: This is not in upstream and still under discussion: + // https://github.com/kubernetes-sigs/gateway-api/issues/1561 + // may be changed if upstream decide to use a different reason for this case. RouteReasonNoMatchingListenerHostname gatewayv1beta1.RouteConditionReason = "NoMatchingListenerHostname" ) @@ -520,7 +523,9 @@ func getUnionOfGatewayHostnames(gateways []supportedGatewayWithCondition) ([]gat } } else { for _, listener := range gateway.gateway.Spec.Listeners { - // REVIEW: which listeners should we take into consideration here if no listener in supported gateways? + // here we consider ALL listeners that are able to configure a hostname if no listener attached. + // may be changed if there is a conclusion on the upstream discussion about it: + // https://github.com/kubernetes-sigs/gateway-api/discussions/1563 if isListenerHostnameEffective(listener) { if listener.Hostname == nil { return nil, true