Skip to content

Commit 7f6a212

Browse files
authored
dont try to report status on routes that dont exist (#11007)
1 parent 877a3a9 commit 7f6a212

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/kgateway/proxy_syncer/proxy_syncer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"maps"
88
"time"
99

10+
apierrors "k8s.io/apimachinery/pkg/api/errors"
1011
"k8s.io/apimachinery/pkg/types"
1112
"k8s.io/client-go/tools/cache"
1213

@@ -390,6 +391,11 @@ func (s *ProxySyncer) syncRouteStatus(ctx context.Context, rm reports.ReportMap)
390391
route := getRouteFunc()
391392
err := s.mgr.GetClient().Get(ctx, routeKey, route)
392393
if err != nil {
394+
if apierrors.IsNotFound(err) {
395+
// the route is not found, we can't report status on it
396+
// if it's recreated, we'll retranslate it anyway
397+
return nil
398+
}
393399
logger.Errorw(fmt.Sprintf("%s get failed", routeType), "error", err, "route", routeKey)
394400
return err
395401
}

0 commit comments

Comments
 (0)