diff --git a/controllers/function_controller.go b/controllers/function_controller.go index 82db9c3f..0c24c7ec 100644 --- a/controllers/function_controller.go +++ b/controllers/function_controller.go @@ -101,15 +101,15 @@ func (r *FunctionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c isNewGeneration := r.checkIfFunctionGenerationsIsIncreased(function) + err = r.ObserveFunctionStatefulSet(ctx, function) + if err != nil { + return reconcile.Result{}, err + } // skip reconcile if pauseRollout is set to true and the generation is not increased if spec.IsPauseRollout(function) && !isNewGeneration { return ctrl.Result{}, nil } - err = r.ObserveFunctionStatefulSet(ctx, function) - if err != nil { - return reconcile.Result{}, err - } err = r.ObserveFunctionService(ctx, function) if err != nil { return reconcile.Result{}, err diff --git a/controllers/sink_controller.go b/controllers/sink_controller.go index 5b3a1d74..d9775b10 100644 --- a/controllers/sink_controller.go +++ b/controllers/sink_controller.go @@ -100,15 +100,15 @@ func (r *SinkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. isNewGeneration := r.checkIfSinkGenerationsIsIncreased(sink) + err = r.ObserveSinkStatefulSet(ctx, sink) + if err != nil { + return reconcile.Result{}, err + } // skip reconcile if pauseRollout is set to true and the generation is not increased if spec.IsPauseRollout(sink) && !isNewGeneration { return ctrl.Result{}, nil } - err = r.ObserveSinkStatefulSet(ctx, sink) - if err != nil { - return reconcile.Result{}, err - } err = r.ObserveSinkService(ctx, sink) if err != nil { return reconcile.Result{}, err diff --git a/controllers/source_controller.go b/controllers/source_controller.go index a5ae0141..5116abfb 100644 --- a/controllers/source_controller.go +++ b/controllers/source_controller.go @@ -100,15 +100,15 @@ func (r *SourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr isNewGeneration := r.checkIfSourceGenerationsIsIncreased(source) + err = r.ObserveSourceStatefulSet(ctx, source) + if err != nil { + return reconcile.Result{}, err + } // skip reconcile if pauseRollout is set to true and the generation is not increased if spec.IsPauseRollout(source) && !isNewGeneration { return ctrl.Result{}, nil } - err = r.ObserveSourceStatefulSet(ctx, source) - if err != nil { - return reconcile.Result{}, err - } err = r.ObserveSourceService(ctx, source) if err != nil { return reconcile.Result{}, err