@@ -146,7 +146,7 @@ func (r *ReconciliationRunner) GetCAPICluster() (ctrl.Result, error) {
146146 Name : name ,
147147 }
148148 if err := r .K8sClient .Get (r .RequestCtx , key , r .CAPICluster ); err != nil {
149- return ctrl.Result {}, errors .Wrapf (client .IgnoreNotFound (err ), "getting CAPI Cluster %s: " , name )
149+ return ctrl.Result {}, errors .Wrapf (client .IgnoreNotFound (err ), "getting CAPI Cluster %s" , name )
150150 } else if r .CAPICluster .Name == "" {
151151 return r .RequeueWithMessage ("Cluster not fetched." )
152152 }
@@ -167,7 +167,7 @@ func (r *ReconciliationRunner) GetCSCluster() (ctrl.Result, error) {
167167 Name : name ,
168168 }
169169 err := r .K8sClient .Get (r .RequestCtx , key , r .CSCluster )
170- return ctrl.Result {}, errors .Wrapf (client .IgnoreNotFound (err ), "getting CAPI Cluster %s: " , name )
170+ return ctrl.Result {}, errors .Wrapf (client .IgnoreNotFound (err ), "getting CAPI Cluster %s" , name )
171171}
172172
173173// CheckOwnedCRDsForReadiness queries for the readiness of CRDs of GroupVersionKind passed.
@@ -181,7 +181,7 @@ func (r *ReconciliationRunner) CheckOwnedCRDsForReadiness(gvks ...schema.GroupVe
181181 potentiallyOnwedObjs .SetGroupVersionKind (gvk )
182182 err := r .K8sClient .List (r .RequestCtx , potentiallyOnwedObjs )
183183 if err != nil {
184- return ctrl.Result {}, errors .Wrapf (err , "requesting owned objects with gvk %s: " , gvk )
184+ return ctrl.Result {}, errors .Wrapf (err , "requesting owned objects with gvk %s" , gvk )
185185 }
186186
187187 // Filter objects not actually owned by reconciliation subject via owner reference UID.
@@ -199,10 +199,10 @@ func (r *ReconciliationRunner) CheckOwnedCRDsForReadiness(gvks ...schema.GroupVe
199199 // Check that found objects are ready.
200200 for _ , owned := range ownedObjs {
201201 if ready , found , err := unstructured .NestedBool (owned .Object , "status" , "ready" ); err != nil {
202- return ctrl.Result {}, errors .Wrapf (err , "parsing ready for object %s: " , owned )
202+ return ctrl.Result {}, errors .Wrapf (err , "parsing ready for object %s" , owned )
203203 } else if ! found || ! ready {
204204 if name , found , err := unstructured .NestedString (owned .Object , "metadata" , "name" ); err != nil {
205- return ctrl.Result {}, errors .Wrapf (err , "parsing name for object %s: " , owned )
205+ return ctrl.Result {}, errors .Wrapf (err , "parsing name for object %s" , owned )
206206 } else if ! found {
207207 return r .RequeueWithMessage (
208208 fmt .Sprintf (
@@ -257,14 +257,14 @@ func (r *ReconciliationRunner) RequeueIfCloudStackClusterNotReady() (ctrl.Result
257257func (r * ReconciliationRunner ) SetupPatcher () (res ctrl.Result , retErr error ) {
258258 r .Log .V (1 ).Info ("Setting up patcher." )
259259 r .Patcher , retErr = patch .NewHelper (r .ReconciliationSubject , r .K8sClient )
260- return res , errors .Wrapf (retErr , "setting up patcher: " )
260+ return res , errors .Wrapf (retErr , "setting up patcher" )
261261}
262262
263263// PatchChangesBackToAPI patches changes to the ReconciliationSubject back to the appropriate API.
264264func (r * ReconciliationRunner ) PatchChangesBackToAPI () (res ctrl.Result , retErr error ) {
265265 r .Log .V (1 ).Info ("Patching changes back to api." )
266266 err := r .Patcher .Patch (r .RequestCtx , r .ReconciliationSubject )
267- return res , errors .Wrapf (err , "patching reconciliation subject: " )
267+ return res , errors .Wrapf (err , "patching reconciliation subject" )
268268}
269269
270270// RequeueWithMessage is a convenience method to log requeue message and then return a result with RequeueAfter set.
@@ -358,7 +358,7 @@ func (r *ReconciliationRunner) GetReconciliationSubject() (res ctrl.Result, rete
358358 r .SetReturnEarly ()
359359 }
360360 if err != nil {
361- return ctrl.Result {}, errors .Wrap (err , "fetching reconciliation subject: " )
361+ return ctrl.Result {}, errors .Wrap (err , "fetching reconciliation subject" )
362362 }
363363 return r .SetupPatcher ()
364364}
0 commit comments