Skip to content

Commit

Permalink
Fix bug in new AWS reconciler where deleted pods would still be recon…
Browse files Browse the repository at this point in the history
…ciled
  • Loading branch information
orishoshan committed Nov 7, 2023
1 parent 9c01822 commit b7100e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (e *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
var pod v1.Pod
err := e.client.Get(ctx, req.NamespacedName, &pod)
if err != nil {
if apierrors.IsNotFound(err) {
return ctrl.Result{}, nil
}
return ctrl.Result{}, err
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (e *PodServiceAccountReconciler) Reconcile(ctx context.Context, req ctrl.Re
var pod v1.Pod
err := e.client.Get(ctx, req.NamespacedName, &pod)
if err != nil {
if apierrors.IsNotFound(err) {
return ctrl.Result{}, nil
}
return ctrl.Result{}, err
}

Expand Down

0 comments on commit b7100e5

Please sign in to comment.