@@ -65,17 +65,15 @@ type loaderImpl struct {
6565 routeSubmitter RouteReconcilerSubmitter
6666 k8sClient client.Client
6767 logger logr.Logger
68- routeValidator RouteValidator
6968 allRouteLoaders map [RouteKind ]func (context context.Context , client client.Client , opts ... client.ListOption ) ([]preLoadRouteDescriptor , error )
7069}
7170
72- func NewLoader (k8sClient client.Client , routeSubmitter RouteReconcilerSubmitter , routeValidator RouteValidator , logger logr.Logger ) Loader {
71+ func NewLoader (k8sClient client.Client , routeSubmitter RouteReconcilerSubmitter , logger logr.Logger ) Loader {
7372 return & loaderImpl {
7473 mapper : newListenerToRouteMapper (k8sClient , logger .WithName ("route-mapper" )),
7574 routeSubmitter : routeSubmitter ,
7675 k8sClient : k8sClient ,
7776 allRouteLoaders : allRoutes ,
78- routeValidator : routeValidator ,
7977 logger : logger ,
8078 }
8179}
@@ -117,13 +115,9 @@ func (l *loaderImpl) LoadRoutesForGateway(ctx context.Context, gw gwv1.Gateway,
117115 // 2. Validate listeners configuration and get listener status
118116 listenerValidationResults := ValidateListeners (gw , controllerName , ctx , l .k8sClient )
119117
120- // 3. Validate route configuration, filter out bad configurations.
121- validatedRoutes , validationErrors := l .routeValidator .filterToValidRoutes (gw , foo )
122- routeStatusUpdates = append (routeStatusUpdates , validationErrors ... )
123-
124- // 4. Remove routes that aren't granted attachment by the listener.
118+ // 3. Remove routes that aren't granted attachment by the listener.
125119 // Map any routes that are granted attachment to the listener port that allows the attachment.
126- mappedRoutes , statusUpdates , err := l .mapper .mapGatewayAndRoutes (ctx , gw , validatedRoutes )
120+ mappedRoutes , statusUpdates , err := l .mapper .mapGatewayAndRoutes (ctx , gw , foo )
127121
128122 routeStatusUpdates = append (routeStatusUpdates , statusUpdates ... )
129123
@@ -134,7 +128,7 @@ func (l *loaderImpl) LoadRoutesForGateway(ctx context.Context, gw gwv1.Gateway,
134128 // Count attached routes per listener for listener status update
135129 attachedRouteMap := buildAttachedRouteMap (gw , mappedRoutes )
136130
137- // 5 . Load the underlying resource(s) for each route that is configured.
131+ // 4 . Load the underlying resource(s) for each route that is configured.
138132 loadedRoute , childRouteLoadUpdates , err := l .loadChildResources (ctx , mappedRoutes , gw )
139133 routeStatusUpdates = append (routeStatusUpdates , childRouteLoadUpdates ... )
140134 if err != nil {
0 commit comments