diff --git a/util/patch/patch.go b/util/patch/patch.go index de6601bd52e6..7a4fefc12d6e 100644 --- a/util/patch/patch.go +++ b/util/patch/patch.go @@ -146,8 +146,11 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e if err := h.patch(ctx, obj); err != nil { errs = append(errs, err) } + if err := h.patchStatus(ctx, obj); err != nil { - errs = append(errs, err) + if !(apierrors.IsNotFound(err) && !obj.GetDeletionTimestamp().IsZero() && len(obj.GetFinalizers()) == 0) { + errs = append(errs, err) + } } if len(errs) > 0 {