From c7abfdf0ab84371a729b7f19516679825aca1168 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Tue, 14 Mar 2023 18:06:42 -0700 Subject: [PATCH] Always set ResolvedRefs Incorporates check added by https://github.com/kubernetes-sigs/gateway-api/pull/1668 Signed-off-by: Arko Dasgupta --- internal/gatewayapi/route.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/internal/gatewayapi/route.go b/internal/gatewayapi/route.go index 55506e9d5d98..5a95ded0eb00 100644 --- a/internal/gatewayapi/route.go +++ b/internal/gatewayapi/route.go @@ -107,6 +107,12 @@ func (t *Translator) processHTTPRouteParentRefs(httpRoute *HTTPRouteContext, res v1beta1.RouteReasonAccepted, "Route is accepted", ) + parentRef.SetCondition(httpRoute, + v1beta1.RouteConditionResolvedRefs, + metav1.ConditionTrue, + v1beta1.RouteReasonResolvedRefs, + "Resolved all the Object references for the Route", + ) } } } @@ -302,6 +308,12 @@ func (t *Translator) processGRPCRouteParentRefs(grpcRoute *GRPCRouteContext, res v1beta1.RouteReasonAccepted, "Route is accepted", ) + parentRef.SetCondition(grpcRoute, + v1beta1.RouteConditionResolvedRefs, + metav1.ConditionTrue, + v1beta1.RouteReasonResolvedRefs, + "Resolved all the Object references for the Route", + ) } } } @@ -612,6 +624,12 @@ func (t *Translator) processTLSRouteParentRefs(tlsRoute *TLSRouteContext, resour v1beta1.RouteReasonAccepted, "Route is accepted", ) + parentRef.SetCondition(tlsRoute, + v1beta1.RouteConditionResolvedRefs, + metav1.ConditionTrue, + v1beta1.RouteReasonResolvedRefs, + "Resolved all the Object references for the Route", + ) } } } @@ -729,6 +747,12 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour v1beta1.RouteReasonAccepted, "Route is accepted", ) + parentRef.SetCondition(udpRoute, + v1beta1.RouteConditionResolvedRefs, + metav1.ConditionTrue, + v1beta1.RouteReasonResolvedRefs, + "Resolved all the Object references for the Route", + ) } if !accepted { parentRef.SetCondition(udpRoute, @@ -854,6 +878,12 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour v1beta1.RouteReasonAccepted, "Route is accepted", ) + parentRef.SetCondition(tcpRoute, + v1beta1.RouteConditionResolvedRefs, + metav1.ConditionTrue, + v1beta1.RouteReasonResolvedRefs, + "Resolved all the Object references for the Route", + ) } if !accepted { parentRef.SetCondition(tcpRoute,