@@ -181,7 +181,7 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Log
181
181
h .parseAndCaptureEvent (ctx , logger , event )
182
182
}
183
183
184
- changeType , graph := h .cfg .processor .Process ()
184
+ changeType , gr := h .cfg .processor .Process ()
185
185
186
186
var err error
187
187
switch changeType {
@@ -193,7 +193,7 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Log
193
193
return
194
194
case state .EndpointsOnlyChange :
195
195
h .version ++
196
- cfg := dataplane .BuildConfiguration (ctx , graph , h .cfg .serviceResolver , h .version )
196
+ cfg := dataplane .BuildConfiguration (ctx , gr , h .cfg .serviceResolver , h .version )
197
197
198
198
h .setLatestConfiguration (& cfg )
199
199
@@ -204,7 +204,7 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Log
204
204
)
205
205
case state .ClusterStateChange :
206
206
h .version ++
207
- cfg := dataplane .BuildConfiguration (ctx , graph , h .cfg .serviceResolver , h .version )
207
+ cfg := dataplane .BuildConfiguration (ctx , gr , h .cfg .serviceResolver , h .version )
208
208
209
209
h .setLatestConfiguration (& cfg )
210
210
@@ -230,10 +230,10 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Log
230
230
231
231
h .latestReloadResult = nginxReloadRes
232
232
233
- h .updateStatuses (ctx , logger , graph )
233
+ h .updateStatuses (ctx , logger , gr )
234
234
}
235
235
236
- func (h * eventHandlerImpl ) updateStatuses (ctx context.Context , logger logr.Logger , graph * graph.Graph ) {
236
+ func (h * eventHandlerImpl ) updateStatuses (ctx context.Context , logger logr.Logger , gr * graph.Graph ) {
237
237
gwAddresses , err := getGatewayAddresses (ctx , h .cfg .k8sClient , nil , h .cfg .gatewayPodConfig )
238
238
if err != nil {
239
239
logger .Error (err , "Setting GatewayStatusAddress to Pod IP Address" )
@@ -243,18 +243,18 @@ func (h *eventHandlerImpl) updateStatuses(ctx context.Context, logger logr.Logge
243
243
244
244
var gcReqs []frameworkStatus.UpdateRequest
245
245
if h .cfg .updateGatewayClassStatus {
246
- gcReqs = status .PrepareGatewayClassRequests (graph .GatewayClass , graph .IgnoredGatewayClasses , transitionTime )
246
+ gcReqs = status .PrepareGatewayClassRequests (gr .GatewayClass , gr .IgnoredGatewayClasses , transitionTime )
247
247
}
248
248
routeReqs := status .PrepareRouteRequests (
249
- graph .L4Routes ,
250
- graph .Routes ,
249
+ gr .L4Routes ,
250
+ gr .Routes ,
251
251
transitionTime ,
252
252
h .latestReloadResult ,
253
253
h .cfg .gatewayCtlrName ,
254
254
)
255
255
256
- polReqs := status .PrepareBackendTLSPolicyRequests (graph .BackendTLSPolicies , transitionTime , h .cfg .gatewayCtlrName )
257
- ngfPolReqs := status .PrepareNGFPolicyRequests (graph .NGFPolicies , transitionTime , h .cfg .gatewayCtlrName )
256
+ polReqs := status .PrepareBackendTLSPolicyRequests (gr .BackendTLSPolicies , transitionTime , h .cfg .gatewayCtlrName )
257
+ ngfPolReqs := status .PrepareNGFPolicyRequests (gr .NGFPolicies , transitionTime , h .cfg .gatewayCtlrName )
258
258
259
259
reqs := make ([]frameworkStatus.UpdateRequest , 0 , len (gcReqs )+ len (routeReqs )+ len (polReqs )+ len (ngfPolReqs ))
260
260
reqs = append (reqs , gcReqs ... )
@@ -267,8 +267,8 @@ func (h *eventHandlerImpl) updateStatuses(ctx context.Context, logger logr.Logge
267
267
// We put Gateway status updates separately from the rest of the statuses because we want to be able
268
268
// to update them separately from the rest of the graph whenever the public IP of NGF changes.
269
269
gwReqs := status .PrepareGatewayRequests (
270
- graph .Gateway ,
271
- graph .IgnoredGateways ,
270
+ gr .Gateway ,
271
+ gr .IgnoredGateways ,
272
272
transitionTime ,
273
273
gwAddresses ,
274
274
h .latestReloadResult ,
@@ -558,15 +558,15 @@ func (h *eventHandlerImpl) nginxGatewayServiceUpsert(ctx context.Context, logger
558
558
logger .Error (err , "Setting GatewayStatusAddress to Pod IP Address" )
559
559
}
560
560
561
- graph := h .cfg .processor .GetLatestGraph ()
562
- if graph == nil {
561
+ gr := h .cfg .processor .GetLatestGraph ()
562
+ if gr == nil {
563
563
return
564
564
}
565
565
566
566
transitionTime := metav1 .Now ()
567
567
gatewayStatuses := status .PrepareGatewayRequests (
568
- graph .Gateway ,
569
- graph .IgnoredGateways ,
568
+ gr .Gateway ,
569
+ gr .IgnoredGateways ,
570
570
transitionTime ,
571
571
gwAddresses ,
572
572
h .latestReloadResult ,
@@ -584,15 +584,15 @@ func (h *eventHandlerImpl) nginxGatewayServiceDelete(
584
584
logger .Error (err , "Setting GatewayStatusAddress to Pod IP Address" )
585
585
}
586
586
587
- graph := h .cfg .processor .GetLatestGraph ()
588
- if graph == nil {
587
+ gr := h .cfg .processor .GetLatestGraph ()
588
+ if gr == nil {
589
589
return
590
590
}
591
591
592
592
transitionTime := metav1 .Now ()
593
593
gatewayStatuses := status .PrepareGatewayRequests (
594
- graph .Gateway ,
595
- graph .IgnoredGateways ,
594
+ gr .Gateway ,
595
+ gr .IgnoredGateways ,
596
596
transitionTime ,
597
597
gwAddresses ,
598
598
h .latestReloadResult ,
0 commit comments