Browse Source

fix(webhookconfig): use a constant Eventf format (#6699)

Jean-Philippe Evrard 6 days ago
parent
commit
6d2734b1c3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/controllers/webhookconfig/webhookconfig.go

+ 1 - 1
pkg/controllers/webhookconfig/webhookconfig.go

@@ -126,7 +126,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
 	err = r.updateConfig(logr.NewContext(ctx, log), &cfg)
 	err = r.updateConfig(logr.NewContext(ctx, log), &cfg)
 	if err != nil {
 	if err != nil {
 		log.Error(err, "could not update webhook config")
 		log.Error(err, "could not update webhook config")
-		r.recorder.Eventf(&cfg, v1.EventTypeWarning, ReasonUpdateFailed, err.Error())
+		r.recorder.Eventf(&cfg, v1.EventTypeWarning, ReasonUpdateFailed, "%s", err)
 		return ctrl.Result{
 		return ctrl.Result{
 			RequeueAfter: time.Minute,
 			RequeueAfter: time.Minute,
 		}, err
 		}, err