@@ -307,7 +307,7 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
307
307
return reconcile.Result {}, err
308
308
}
309
309
310
- r .log .Error (err , fmt . Sprintf ( "failed processGatewayClassParamsRef for gatewayClass %s" , managedGC .Name ) )
310
+ r .log .Error (err , "failed to process ParamsRef for gatewayClass" , "gatewayClass" , managedGC .Name )
311
311
msg := fmt .Sprintf ("%s: %v" , status .MsgGatewayClassInvalidParams , err )
312
312
gc := status .SetGatewayClassAccepted (
313
313
managedGC .DeepCopy (),
@@ -330,7 +330,7 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
330
330
return reconcile.Result {}, err
331
331
}
332
332
333
- r .log .Error (err , fmt . Sprintf ( "failed process TLS SecretRef for EnvoyProxy for gatewayClass %s" , managedGC .Name ) )
333
+ r .log .Error (err , "failed process TLS SecretRef for EnvoyProxy for gatewayClass" , "gatewayClass" , managedGC .Name )
334
334
gc := status .SetGatewayClassAccepted (
335
335
managedGC .DeepCopy (),
336
336
false ,
@@ -346,6 +346,7 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
346
346
347
347
if ! failToProcessGCParamsRef {
348
348
// GatewayClass is valid so far, mark it as accepted.
349
+ r .log .Info ("Set GatewayClass Accepted" , "gatewayClass" , managedGC .Name )
349
350
gc := status .SetGatewayClassAccepted (
350
351
managedGC .DeepCopy (),
351
352
true ,
@@ -498,16 +499,15 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
498
499
}
499
500
500
501
if len (gwcResource .Gateways ) == 0 {
501
- r .log .Info ("No gateways found for accepted gatewayClass" )
502
+ r .log .Info ("No gateways found for accepted gatewayClass" , "gatewayClass" , managedGC . Name )
502
503
503
504
// If needed, remove the finalizer from the accepted GatewayClass.
504
505
if err := r .removeFinalizer (ctx , managedGC ); err != nil {
505
506
if isTransientError (err ) {
506
507
r .log .Error (err , "transient error removing finalizer from gatewayClass" , "gatewayClass" , managedGC .Name )
507
508
return reconcile.Result {}, err
508
509
}
509
- r .log .Error (err , fmt .Sprintf ("failed to remove finalizer from gatewayClass %s" ,
510
- managedGC .Name ))
510
+ r .log .Error (err , "failed to remove finalizer from gatewayClass" , "gatewayClass" , managedGC .Name )
511
511
}
512
512
} else {
513
513
// finalize the accepted GatewayClass.
@@ -516,8 +516,7 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
516
516
r .log .Error (err , "transient error adding finalizer to gatewayClass" , "gatewayClass" , managedGC .Name )
517
517
return reconcile.Result {}, err
518
518
}
519
- r .log .Error (err , fmt .Sprintf ("failed adding finalizer to gatewayClass %s" ,
520
- managedGC .Name ))
519
+ r .log .Error (err , "failed adding finalizer to gatewayClass" , "gatewayClass" , managedGC .Name )
521
520
}
522
521
}
523
522
}
0 commit comments