Skip to content

Commit ed22848

Browse files
committed
lint
Signed-off-by: jukie <isaac.wilson514@gmail.com>
1 parent 92aa64a commit ed22848

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

internal/gatewayapi/route.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,17 +1313,13 @@ func (t *Translator) processHTTPRouteParentRefListener(route RouteContext, route
13131313

13141314
// checkRouteOverlaps detects overlapping route matches across all IR listeners
13151315
// and sets a warning Overlap condition on the affected HTTPRoutes.
1316-
// This runs once after all routes are processed, checking each listener's routes
1317-
// for duplicates from different HTTPRoute resources.
13181316
// routeKey returns a "namespace/name" key for a route resource metadata.
13191317
func routeKey(namespace, name string) string {
13201318
return namespace + "/" + name
13211319
}
13221320

13231321
// checkRouteOverlaps detects overlapping route matches across all IR listeners
13241322
// and sets a warning Overlap condition on the affected HTTPRoutes and GRPCRoutes.
1325-
// This runs once after all routes are processed, rather than inside the per-route
1326-
// processing loop where it would execute N times.
13271323
func (t *Translator) checkRouteOverlaps(httpRoutes []*HTTPRouteContext, grpcRoutes []*GRPCRouteContext, xdsIR resource.XdsIRMap) {
13281324
// Build a combined lookup from "namespace/name" to RouteContext and its ParentRefs.
13291325
type routeInfo struct {

internal/gatewayapi/status/error.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const (
3232
RouteReasonEndpointsNotFound gwapiv1.RouteConditionReason = "EndpointsNotFound"
3333

3434
// Route overlap reason and condition type
35-
RouteReasonOverlap gwapiv1.RouteConditionReason = "Overlap"
36-
RouteConditionOverlap gwapiv1.RouteConditionType = "Overlap"
35+
RouteReasonOverlap gwapiv1.RouteConditionReason = "Overlap"
36+
RouteConditionOverlap gwapiv1.RouteConditionType = "Overlap"
3737

3838
// Network configuration related condition types
3939
RouteConditionBackendsAvailable gwapiv1.RouteConditionType = "BackendsAvailable"

internal/gatewayapi/translator.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ func (t *Translator) Translate(resources *resource.Resources) (*TranslateResult,
287287
grpcRoutes := t.ProcessGRPCRoutes(resources.GRPCRoutes, acceptedGateways, resources, xdsIR)
288288

289289
// Check for overlapping route matches across all listeners after all HTTP and
290-
// GRPC routes have been processed. This runs once rather than inside the
291-
// per-route processing loop where it would execute N times.
290+
// GRPC routes have been processed.
292291
t.checkRouteOverlaps(httpRoutes, grpcRoutes, xdsIR)
293292

294293
// Process all relevant TLSRoutes.

0 commit comments

Comments
 (0)