Skip to content

Commit

Permalink
Bugfix on DB credentials reconciler: ignore NotFound errors on queryi…
Browse files Browse the repository at this point in the history
…ng namespaces (#161)
  • Loading branch information
amitlicht authored Sep 16, 2024
1 parent 185a6e5 commit 0004f88
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ func (e *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
// Fix for when the namespace is terminating but pods aren't getting the delete trigger just yet
namespace := v1.Namespace{}
if err := e.client.Get(ctx, types.NamespacedName{Name: req.Namespace}, &namespace); err != nil {
if apierrors.IsNotFound(err) {
return ctrl.Result{}, nil
}
return ctrl.Result{}, errors.Wrap(err)
}

Expand Down

0 comments on commit 0004f88

Please sign in to comment.