Skip to content

Commit

Permalink
Prevent reconciliation if CSINodeTopology instance is already at Succ…
Browse files Browse the repository at this point in the history
…ess state (kubernetes-sigs#1906)
  • Loading branch information
shalini-b committed Aug 10, 2022
1 parent 98d7d10 commit b086c76
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ func (r *ReconcileCSINodeTopology) reconcileForVanilla(ctx context.Context, requ
// Error reading the object - return with err.
return reconcile.Result{}, err
}
// If the CR status is already at Success, do not reconcile further.
if instance.Status.Status == csinodetopologyv1alpha1.CSINodeTopologySuccess {
log.Infof("CSINodeTopology instance with name %q is already at %q state. No need to "+
"reconcile further.", instance.Name, instance.Status.Status)
return reconcile.Result{}, err
}

// Initialize backOffDuration for the instance, if required.
backOffDurationMapMutex.Lock()
Expand Down

0 comments on commit b086c76

Please sign in to comment.