Skip to content

Commit fd84967

Browse files
author
Richard Kovacs
committed
Filter out not found in vpc controller patch
1 parent 1b60a16 commit fd84967

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controller/linodevpc_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525

2626
corev1 "k8s.io/api/core/v1"
2727
"k8s.io/apimachinery/pkg/runtime"
28+
utilerrors "k8s.io/apimachinery/pkg/util/errors"
2829
"k8s.io/client-go/tools/record"
2930
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
3031
"sigs.k8s.io/cluster-api/util/conditions"
@@ -118,7 +119,7 @@ func (r *LinodeVPCReconciler) reconcile(
118119
r.Recorder.Event(vpcScope.LinodeVPC, corev1.EventTypeWarning, string(failureReason), err.Error())
119120
}
120121

121-
if patchErr := vpcScope.PatchHelper.Patch(ctx, vpcScope.LinodeVPC); patchErr != nil && client.IgnoreNotFound(patchErr) != nil {
122+
if patchErr := vpcScope.PatchHelper.Patch(ctx, vpcScope.LinodeVPC); patchErr != nil && utilerrors.FilterOut(patchErr) != nil {
122123
logger.Error(patchErr, "failed to patch LinodeVPC")
123124

124125
err = errors.Join(err, patchErr)

0 commit comments

Comments
 (0)