diff --git a/internal/gatewayapi/route.go b/internal/gatewayapi/route.go index f2b99db78f62..43c3c44aceef 100644 --- a/internal/gatewayapi/route.go +++ b/internal/gatewayapi/route.go @@ -173,6 +173,7 @@ func (t *Translator) processHTTPRouteRules(httpRoute *HTTPRouteContext, parentRe dstAddrTypeMap := make(map[ir.DestinationAddressType]int) for _, backendRef := range rule.BackendRefs { + backendRef := backendRef backendRefContext := BackendRefContext{ HTTPBackendRef: &backendRef, } @@ -471,6 +472,7 @@ func (t *Translator) processGRPCRouteRules(grpcRoute *GRPCRouteContext, parentRe } for _, backendRef := range rule.BackendRefs { + backendRef := backendRef backendRefContext := BackendRefContext{ GRPCBackendRef: &backendRef, }