Skip to content

Commit ba41f87

Browse files
Merge pull request #217 from gibizer/remove-double-update
TransportURL: rely on PatchInstance instead of manual Update
2 parents 3266115 + 77fda22 commit ba41f87

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

controllers/rabbitmq/transporturl_controller.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,8 @@ func (r *TransportURLReconciler) Reconcile(ctx context.Context, req ctrl.Request
150150
instance.Status.ObservedGeneration = instance.Generation
151151

152152
if isNewInstance {
153-
// Register overall status immediately to have an early feedback e.g. in the cli
154-
if err := r.Status().Update(ctx, instance); err != nil {
155-
return ctrl.Result{}, err
156-
}
153+
// Return to register overall status immediately to have an early feedback e.g. in the cli
154+
return ctrl.Result{}, nil
157155
}
158156

159157
return r.reconcileNormal(ctx, instance, helper)

0 commit comments

Comments
 (0)