Skip to content

Commit

Permalink
update status update logic patch from Andre
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
  • Loading branch information
msherif1234 committed May 28, 2024
1 parent 6e8d572 commit 7f71813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/bpfman-agent/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func (r *ReconcilerCommon) updateStatus(ctx context.Context, bpfProgram *bpfmani
meta.SetStatusCondition(&bpfProgram.Status.Conditions, cond.Condition())

r.Logger.V(1).Info("Updating bpfProgram condition", "bpfProgram", bpfProgram.Name, "condition", cond.Condition().Type)
if err := r.Status().Update(ctx, bpfProgram); err != nil {
if err := r.Update(ctx, bpfProgram); err != nil {
r.Logger.Error(err, "failed to set bpfProgram object status")
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/bpfman-operator/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (r *ReconcilerCommon) updateCondition(ctx context.Context, obj client.Objec

meta.SetStatusCondition(conditions, cond.Condition(message))

if err := r.Status().Update(ctx, obj); err != nil {
if err := r.Update(ctx, obj); err != nil {
r.Logger.V(1).Info("failed to set *Program object status...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
}
Expand Down

0 comments on commit 7f71813

Please sign in to comment.