Skip to content

Commit

Permalink
ignore Invalid errors too
Browse files Browse the repository at this point in the history
  • Loading branch information
orishavit committed Sep 25, 2024
1 parent 943ea1c commit 7204ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operator/controllers/iam/pods/pods_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (r *PodReconciler) handlePodCleanup(ctx context.Context, pod corev1.Pod) (c
if controllerutil.RemoveFinalizer(updatedPod, r.agent.FinalizerName()) || controllerutil.RemoveFinalizer(updatedPod, metadata.DeprecatedIAMRoleFinalizer) {
err := r.Patch(ctx, updatedPod, client.StrategicMergeFrom(&pod))
if err != nil {
if apierrors.IsConflict(err) || apierrors.IsNotFound(err) || apierrors.IsForbidden(err) {
if apierrors.IsConflict(err) || apierrors.IsNotFound(err) || apierrors.IsForbidden(err) || apierrors.IsInvalid(err) {
// These are all errors that can happen because the pod is already being deleted, requeuing
// should solve them all in a classy way
return ctrl.Result{Requeue: true}, nil
Expand Down

0 comments on commit 7204ec3

Please sign in to comment.