During the reconcile loop, we should exit the loop once we face an error and update the status accordingly. Take this for example:
if err != nil { updateResourceResult.Err = err updateResourceResult.ErrorReason = v1alpha1.ParseCRRequestFailedReason } deployedRes, err := kogitores.GetDeployedResources(instance, r.client) if err != nil { updateResourceResult.Err = err updateResourceResult.ErrorReason = v1alpha1.RetrieveDeployedResourceFailedReason }
The controller should update the status with the error and exit the loop, not continue to not swallow any possible errors.