Skip to content

Commit

Permalink
Always set ResolvedRefs
Browse files Browse the repository at this point in the history
Incorporates check added by kubernetes-sigs/gateway-api#1668

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg committed Mar 15, 2023
1 parent 1661a89 commit c7abfdf
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions internal/gatewayapi/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
}
}
}
Expand Down Expand Up @@ -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",
)
}
}
}
Expand Down Expand Up @@ -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",
)
}
}
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c7abfdf

Please sign in to comment.