Skip to content

Commit

Permalink
log warning if error and non-zero Result returned
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed Aug 17, 2023
1 parent 480fc5b commit 3b25387
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ func (c *Controller) reconcileHandler(ctx context.Context, obj interface{}) {
}
ctrlmetrics.ReconcileErrors.WithLabelValues(c.Name).Inc()
ctrlmetrics.ReconcileTotal.WithLabelValues(c.Name, labelError).Inc()
if !result.IsZero() {
log.Info("Warning: error and non-zero Result returned, ignoring Result")
}
log.Error(err, "Reconciler error")
case result.RequeueAfter > 0:
log.V(5).Info(fmt.Sprintf("Reconcile done, requeueing after %s", result.RequeueAfter))
Expand Down

0 comments on commit 3b25387

Please sign in to comment.