Skip to content

Commit

Permalink
Merge pull request #28 from cybozu-go/fix-infinite-reconciliation
Browse files Browse the repository at this point in the history
Fix infinite reconciliation on non-existent namespaces
  • Loading branch information
zoetrope authored Oct 26, 2021
2 parents cd32c4f + 018a0ab commit 46bad6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/propagate.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func (r *PropagateController) handleDelete(ctx context.Context, req ctrl.Request

ns := &corev1.Namespace{}
if err := r.Get(ctx, client.ObjectKey{Name: req.Namespace}, ns); err != nil {
if apierrors.IsNotFound(err) {
return nil
}
return fmt.Errorf("failed to get namespace %s: %w", req.Namespace, err)
}

Expand Down

0 comments on commit 46bad6b

Please sign in to comment.