@@ -68,7 +68,7 @@ func (r *ServiceBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reque
6868 serviceBinding = serviceBinding .DeepCopy ()
6969
7070 if len (serviceBinding .GetConditions ()) == 0 {
71- err := r .init (ctx , log , serviceBinding )
71+ err := r .init (ctx , serviceBinding )
7272 if err != nil {
7373 return ctrl.Result {}, err
7474 }
@@ -107,7 +107,7 @@ func (r *ServiceBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reque
107107 }
108108
109109 setBlockedCondition (instanceErr .Error (), serviceBinding )
110- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
110+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
111111 return ctrl.Result {}, err
112112 }
113113
@@ -119,7 +119,7 @@ func (r *ServiceBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reque
119119
120120 setInProgressConditions (smTypes .CREATE , fmt .Sprintf ("creation in progress, waiting for service instance '%s' to be ready" , serviceBinding .Spec .ServiceInstanceName ),
121121 serviceBinding )
122- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
122+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
123123 return ctrl.Result {}, err
124124 }
125125
@@ -134,7 +134,7 @@ func (r *ServiceBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reque
134134 err := r .validateSecretNameIsAvailable (ctx , serviceBinding )
135135 if err != nil {
136136 setBlockedCondition (err .Error (), serviceBinding )
137- return ctrl.Result {}, r .updateStatusWithRetries (ctx , serviceBinding , log )
137+ return ctrl.Result {}, r .updateStatus (ctx , serviceBinding )
138138 }
139139
140140 binding , err := r .getBindingForRecovery (smClient , serviceBinding , log )
@@ -154,7 +154,7 @@ func (r *ServiceBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reque
154154 }
155155 r .resyncBindingStatus (serviceBinding , binding , serviceInstance .Status .InstanceID )
156156
157- return ctrl.Result {}, r .updateStatusWithRetries (ctx , serviceBinding , log )
157+ return ctrl.Result {}, r .updateStatus (ctx , serviceBinding )
158158 }
159159 if serviceBinding .Status .Ready != metav1 .ConditionTrue {
160160 return r .createBinding (ctx , smClient , serviceInstance , serviceBinding , log )
@@ -205,7 +205,7 @@ func (r *ServiceBindingReconciler) createBinding(ctx context.Context, smClient s
205205 serviceBinding .Status .OperationURL = operationURL
206206 serviceBinding .Status .OperationType = smTypes .CREATE
207207 setInProgressConditions (smTypes .CREATE , "" , serviceBinding )
208- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
208+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
209209 log .Error (err , "unable to update ServiceBinding status" )
210210 return ctrl.Result {}, err
211211 }
@@ -223,7 +223,7 @@ func (r *ServiceBindingReconciler) createBinding(ctx context.Context, smClient s
223223 setSuccessConditions (smTypes .CREATE , serviceBinding )
224224 log .Info ("Updating binding" , "bindingID" , smBinding .ID )
225225
226- return ctrl.Result {}, r .updateStatusWithRetries (ctx , serviceBinding , log )
226+ return ctrl.Result {}, r .updateStatus (ctx , serviceBinding )
227227}
228228
229229func (r * ServiceBindingReconciler ) delete (ctx context.Context , smClient sm.Client , serviceBinding * v1alpha1.ServiceBinding , log logr.Logger ) (ctrl.Result , error ) {
@@ -238,7 +238,7 @@ func (r *ServiceBindingReconciler) delete(ctx context.Context, smClient sm.Clien
238238 log .Info ("binding exists in SM continue with deletion" )
239239 serviceBinding .Status .BindingID = smBinding .ID
240240 setInProgressConditions (smTypes .DELETE , "delete after recovery" , serviceBinding )
241- return ctrl.Result {}, r .updateStatusWithRetries (ctx , serviceBinding , log )
241+ return ctrl.Result {}, r .updateStatus (ctx , serviceBinding )
242242 }
243243
244244 // make sure there's no secret stored for the binding
@@ -266,7 +266,7 @@ func (r *ServiceBindingReconciler) delete(ctx context.Context, smClient sm.Clien
266266 serviceBinding .Status .OperationURL = operationURL
267267 serviceBinding .Status .OperationType = smTypes .DELETE
268268 setInProgressConditions (smTypes .DELETE , "" , serviceBinding )
269- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
269+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
270270 return ctrl.Result {}, err
271271 }
272272 return ctrl.Result {Requeue : true , RequeueAfter : r .Config .PollInterval }, nil
@@ -291,7 +291,7 @@ func (r *ServiceBindingReconciler) poll(ctx context.Context, smClient sm.Client,
291291 freshStatus .BindingID = serviceBinding .Status .BindingID
292292 }
293293 serviceBinding .Status = freshStatus
294- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
294+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
295295 log .Error (err , "failed to update status during polling" )
296296 }
297297 return ctrl.Result {}, statusErr
@@ -312,7 +312,7 @@ func (r *ServiceBindingReconciler) poll(ctx context.Context, smClient sm.Client,
312312 if serviceBinding .Status .OperationType == smTypes .DELETE {
313313 serviceBinding .Status .OperationURL = ""
314314 serviceBinding .Status .OperationType = ""
315- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
315+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
316316 log .Error (err , "unable to update ServiceBinding status" )
317317 return ctrl.Result {}, err
318318 }
@@ -345,7 +345,7 @@ func (r *ServiceBindingReconciler) poll(ctx context.Context, smClient sm.Client,
345345 serviceBinding .Status .OperationURL = ""
346346 serviceBinding .Status .OperationType = ""
347347
348- return ctrl.Result {}, r .updateStatusWithRetries (ctx , serviceBinding , log )
348+ return ctrl.Result {}, r .updateStatus (ctx , serviceBinding )
349349}
350350
351351func (r * ServiceBindingReconciler ) SetOwner (ctx context.Context , serviceInstance * v1alpha1.ServiceInstance , serviceBinding * v1alpha1.ServiceBinding , log logr.Logger ) error {
@@ -528,7 +528,7 @@ func (r *ServiceBindingReconciler) getBindingForRecovery(smClient sm.Client, ser
528528func (r * ServiceBindingReconciler ) removeBindingFromKubernetes (ctx context.Context , serviceBinding * v1alpha1.ServiceBinding , log logr.Logger ) (ctrl.Result , error ) {
529529 serviceBinding .Status .BindingID = ""
530530 setSuccessConditions (smTypes .DELETE , serviceBinding )
531- if err := r .updateStatusWithRetries (ctx , serviceBinding , log ); err != nil {
531+ if err := r .updateStatus (ctx , serviceBinding ); err != nil {
532532 return ctrl.Result {}, err
533533 }
534534
@@ -589,7 +589,7 @@ func (r *ServiceBindingReconciler) maintain(ctx context.Context, binding *v1alph
589589
590590 if shouldUpdateStatus {
591591 log .Info (fmt .Sprintf ("maintanance required for binding %s" , binding .Name ))
592- return ctrl.Result {}, r .updateStatusWithRetries (ctx , binding , log )
592+ return ctrl.Result {}, r .updateStatus (ctx , binding )
593593 }
594594 return ctrl.Result {}, nil
595595}
0 commit comments