Skip to content

Commit

Permalink
Ignore not-found errors when attempting to delete external traffic po…
Browse files Browse the repository at this point in the history
…licies (#447)
  • Loading branch information
amitlicht committed Jun 30, 2024
1 parent 3aab755 commit f0aa2d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ func (r *NetworkPolicyHandler) handlePolicyDelete(ctx context.Context, policyNam
r.RecordNormalEvent(owner, ReasonRemovingExternalTrafficPolicy, "removing external traffic network policy, reconciler was disabled")

err = r.client.Delete(ctx, policy)
if err != nil {
if err != nil && !k8serrors.IsNotFound(err) {
r.RecordWarningEventf(owner, ReasonRemovingExternalTrafficPolicyFailed, "failed removing external traffic network policy: %s", err.Error())
return errors.Wrap(err)
}
Expand Down

0 comments on commit f0aa2d4

Please sign in to comment.