diff --git a/controllers/utils/base_reconciler.go b/controllers/utils/base_reconciler.go index 2e1d05b3..082d3dd0 100644 --- a/controllers/utils/base_reconciler.go +++ b/controllers/utils/base_reconciler.go @@ -328,13 +328,6 @@ func (r *ReconciliationRunner) SetupPatcher() (res ctrl.Result, retErr error) { return res, errors.Wrapf(retErr, "setting up patcher") } -// PatchChangesBackToAPI patches changes to the ReconciliationSubject back to the appropriate API. -func (r *ReconciliationRunner) PatchChangesBackToAPI() (res ctrl.Result, retErr error) { - r.Log.V(1).Info("Patching changes back to api.") - err := r.Patcher.Patch(r.RequestCtx, r.ReconciliationSubject) - return res, errors.Wrapf(err, "patching reconciliation subject") -} - // RequeueWithMessage is a convenience method to log requeue message and then return a result with RequeueAfter set. func (r *ReconciliationRunner) RequeueWithMessage(msg string, keysAndValues ...interface{}) (ctrl.Result, error) { // Add requeuing to message if not present. Might turn this into a lint check later. @@ -350,17 +343,12 @@ func (r *ReconciliationRunner) ReturnWrappedError(err error, msg string) (ctrl.R return ctrl.Result{}, errors.Wrap(err, msg) } -func (r *ReconciliationRunner) LogReconciliationSubject() (ctrl.Result, error) { - r.Log.Info("The subject", "subject", r.ReconciliationSubject) - return ctrl.Result{}, nil -} - // CloudStackReconcilerMethod is the method type used in RunReconciliationStages. Additional arguments can be added // by wrapping this type in another function affectively currying them. type CloudStackReconcilerMethod func() (ctrl.Result, error) -// RunReconciliationStage runs a CloudStackReconcilerMethod and returns a boolean to indicate whether that stage would -// have returned a result that cuts the process short or not. +// ShouldReturn returns a boolean to indicate whether a CloudStackReconcilerMethod returned a result that should cut the +// reconciliation process short or not. func (r *ReconciliationRunner) ShouldReturn(rslt ctrl.Result, err error) bool { if err != nil { return true @@ -429,7 +417,7 @@ func (r *ReconciliationRunner) SetReturnEarly() { r.returnEarly = true } -// GetReconcilationSubject gets the reconciliation subject of type defined by the concrete reconciler. It also sets up +// GetReconciliationSubject gets the reconciliation subject of type defined by the concrete reconciler. It also sets up // a patch helper at this point. func (r *ReconciliationRunner) GetReconciliationSubject() (res ctrl.Result, reterr error) { r.Log.V(1).Info("Getting reconciliation subject.")