From 763415d130b07c5fb4717c463f37e0a3555dba49 Mon Sep 17 00:00:00 2001 From: Bohdan Siryk Date: Wed, 8 Nov 2023 12:48:33 +0200 Subject: [PATCH] nodereload controller fix --- controllers/clusterresources/nodereload_controller.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controllers/clusterresources/nodereload_controller.go b/controllers/clusterresources/nodereload_controller.go index 9640fb5e4..cda6e6d85 100644 --- a/controllers/clusterresources/nodereload_controller.go +++ b/controllers/clusterresources/nodereload_controller.go @@ -165,8 +165,7 @@ func (r *NodeReloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) err = r.Status().Patch(ctx, nrs, patch) if err != nil { l.Error(err, "Failed to patch current operation status", - "node ID", nrs.Status.NodeInProgress.ID, - "currentOperationStatus", nodeReloadStatus, + "status", nodeReloadStatus, ) r.EventRecorder.Eventf(nrs, models.Warning, models.FetchFailed, "Failed to patch current operation status. Reason: %w", err, @@ -187,7 +186,7 @@ func (r *NodeReloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) "status", nrs.Status, ) r.EventRecorder.Eventf(nrs, models.Normal, models.UpdatedEvent, - "Node %s has been successfully reloaded", nrs.Status, + "Node %s has been successfully reloaded", nodeReloadStatus.NodeID, ) patch = nrs.NewPatch()