Skip to content

Commit

Permalink
reconciler/managed: don't brick MR on create conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
(cherry picked from commit 34c3e60)
  • Loading branch information
sttts authored and github-actions[bot] committed Jan 29, 2024
1 parent 9f07a74 commit 70ccc45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/reconciler/managed/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,9 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (resu
// issue we'll be requeued implicitly when we update our status with
// the new error condition. If not, we requeue explicitly, which will trigger backoff.
log.Debug("Cannot create external resource", "error", err)
if kerrors.IsConflict(err) {
return reconcile.Result{Requeue: true}, nil
if !kerrors.IsConflict(err) {
record.Event(managed, event.Warning(reasonCannotCreate, err))
}
record.Event(managed, event.Warning(reasonCannotCreate, err))

// We handle annotations specially here because it's
// critical that they are persisted to the API server.
Expand Down

0 comments on commit 70ccc45

Please sign in to comment.