@@ -1470,7 +1470,7 @@ func (r *gatewayAPIReconciler) processGateways(ctx context.Context, managedGC *g
14701470 if r .isGatewayClassMerged (managedGC .Name ) {
14711471 mergedGateways = true
14721472 // processGatewayClassParamsRef has been called for this GatewayClass, its EnvoyProxy should exist in resourceTree
1473- r .processServiceClusterForGatewayClass (resourceTree .EnvoyProxyForGatewayClass , managedGC , resourceMap )
1473+ r .processServiceClusterForGatewayClass (ctx , resourceTree .EnvoyProxyForGatewayClass , managedGC , resourceMap )
14741474 }
14751475
14761476 for i := range gatewayList .Items {
@@ -1576,7 +1576,7 @@ func (r *gatewayAPIReconciler) processGateways(ctx context.Context, managedGC *g
15761576 if ep == nil && resourceTree .EnvoyProxyForGatewayClass != nil {
15771577 ep = resourceTree .EnvoyProxyForGatewayClass
15781578 }
1579- r .processServiceClusterForGateway (ep , gtw , resourceMap )
1579+ r .processServiceClusterForGateway (ctx , ep , gtw , resourceMap )
15801580 }
15811581
15821582 if ! resourceMap .allAssociatedGateways .Has (gtwNamespacedName ) {
@@ -1589,7 +1589,7 @@ func (r *gatewayAPIReconciler) processGateways(ctx context.Context, managedGC *g
15891589}
15901590
15911591// Called on a GatewayClass when merged gateways mode is enabled for it.
1592- func (r * gatewayAPIReconciler ) processServiceClusterForGatewayClass (ep * egv1a1.EnvoyProxy , gatewayClass * gwapiv1.GatewayClass , resourceMap * resourceMappings ) {
1592+ func (r * gatewayAPIReconciler ) processServiceClusterForGatewayClass (ctx context. Context , ep * egv1a1.EnvoyProxy , gatewayClass * gwapiv1.GatewayClass , resourceMap * resourceMappings ) {
15931593 // Skip processing if topology injector is disabled
15941594 if r .envoyGateway != nil && r .envoyGateway .TopologyInjectorDisabled () {
15951595 return
@@ -1605,11 +1605,11 @@ func (r *gatewayAPIReconciler) processServiceClusterForGatewayClass(ep *egv1a1.E
16051605 }
16061606 }
16071607
1608- r .insertProxyServiceIfExists (proxySvcName , proxySvcNamespace , resourceMap )
1608+ r .insertProxyServiceIfExists (ctx , proxySvcName , proxySvcNamespace , resourceMap )
16091609}
16101610
16111611// Called on a Gateway when merged gateways mode is not enabled for its parent GatewayClass.
1612- func (r * gatewayAPIReconciler ) processServiceClusterForGateway (ep * egv1a1.EnvoyProxy , gateway * gwapiv1.Gateway , resourceMap * resourceMappings ) {
1612+ func (r * gatewayAPIReconciler ) processServiceClusterForGateway (ctx context. Context , ep * egv1a1.EnvoyProxy , gateway * gwapiv1.Gateway , resourceMap * resourceMappings ) {
16131613 // Skip processing if topology injector is disabled
16141614 if r .envoyGateway != nil && r .envoyGateway .TopologyInjectorDisabled () {
16151615 return
@@ -1630,17 +1630,17 @@ func (r *gatewayAPIReconciler) processServiceClusterForGateway(ep *egv1a1.EnvoyP
16301630 }
16311631 }
16321632
1633- r .insertProxyServiceIfExists (proxySvcName , proxySvcNamespace , resourceMap )
1633+ r .insertProxyServiceIfExists (ctx , proxySvcName , proxySvcNamespace , resourceMap )
16341634}
16351635
1636- func (r * gatewayAPIReconciler ) insertProxyServiceIfExists (name , namespace string , resourceMap * resourceMappings ) {
1636+ func (r * gatewayAPIReconciler ) insertProxyServiceIfExists (ctx context. Context , name , namespace string , resourceMap * resourceMappings ) {
16371637 svcNN := types.NamespacedName {Name : name , Namespace : namespace }
16381638 svc := new (corev1.Service )
1639- err := r .client .Get (context . Background () , svcNN , svc )
1639+ err := r .client .Get (ctx , svcNN , svc )
16401640 // Only insert if service exists
16411641 if err != nil {
16421642 if ! kerrors .IsNotFound (err ) {
1643- r .log .Error ( err , "failed to get proxy service" , "namespace" , namespace , "name" , name )
1643+ r .log .Info ( "failed to get proxy service" , "namespace" , namespace , "name" , name , "error" , err )
16441644 }
16451645 return
16461646 }
0 commit comments