Skip to content

Commit

Permalink
Update status
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed Sep 13, 2024
1 parent 36a0498 commit ad35675
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/function_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ func (r *FunctionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
}
// skip reconcile if pauseRollout is set to true and the generation is not increased
if spec.IsPauseRollout(function) && !isNewGeneration {
err = r.Status().Update(ctx, function)
if err != nil {
r.Log.Error(err, "failed to update function status after observing statefulset")
return ctrl.Result{}, err
}
return ctrl.Result{}, nil
}

Expand Down
5 changes: 5 additions & 0 deletions controllers/sink_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ func (r *SinkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.
}
// skip reconcile if pauseRollout is set to true and the generation is not increased
if spec.IsPauseRollout(sink) && !isNewGeneration {
err = r.Status().Update(ctx, sink)
if err != nil {
r.Log.Error(err, "failed to update sink status after observing statefulset")
return ctrl.Result{}, err
}
return ctrl.Result{}, nil
}

Expand Down
5 changes: 5 additions & 0 deletions controllers/source_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ func (r *SourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
}
// skip reconcile if pauseRollout is set to true and the generation is not increased
if spec.IsPauseRollout(source) && !isNewGeneration {
err = r.Status().Update(ctx, source)
if err != nil {
r.Log.Error(err, "failed to update source status after observing statefulset")
return ctrl.Result{}, err
}
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit ad35675

Please sign in to comment.