fix(issues): detect missing Gateway API references - #1392
Merged
nadaverell merged 1 commit intoAug 9, 2026
Merged
Conversation
nadaverell
force-pushed
the
fix/rad-346-gateway-missing-refs
branch
from
August 9, 2026 08:13
7daa6e4 to
a0b4968
Compare
nadaverell
force-pushed
the
fix/rad-346-gateway-missing-refs
branch
from
August 9, 2026 08:26
a0b4968 to
93ee479
Compare
nadaverell
merged commit Aug 9, 2026
2da1e04
into
fix/rad-346-webhook-missing-service
1 check passed
nadaverell
added a commit
that referenced
this pull request
Aug 9, 2026
## Summary - detect Gateways that reference a missing GatewayClass after a two-minute reconciliation grace - detect HTTPRoute, GRPCRoute, TCPRoute, and TLSRoute parentRefs that target a missing Gateway - require authoritative cluster or exact-namespace informer coverage before asserting absence - preserve unrelated Gateway controller conditions while deduplicating exact structural echoes, including Envoy Gateway PortNotFound - apply the same authority check to KEDA Rollout scaleTargetRefs so partial caches cannot produce false missing-target issues ## Validation - `make build` - `make test` - `make tsc` - `go test ./internal/issues ./internal/k8s` - `go test ./...` from `pkg/k8score/` - live EKS smoke on `radar-test-nonprod`: grace suppression, both findings present, target creation recovery, and fixture cleanup - Playwright Issues-page smoke with both findings rendered and zero console errors - visual-test skipped: no UI delta ## Stack - stacked on #1391 - #1391 is stacked on #1390 Linear: RAD-346 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes live issue detection for Gateway networking and dynamic-cache “absence” semantics; incorrect authority or dedupe could hide real problems or briefly miss issues during informer sync, but behavior is heavily tested and biased toward silence when coverage is incomplete. > > **Overview** > Extends **Gateway API missing-reference detection** beyond route backend Services: after a **2-minute grace**, it flags **Gateways** with a non-existent `spec.gatewayClassName` and **routes** (`HTTPRoute`, `GRPCRoute`, `TCPRoute`, `TLSRoute`) whose `parentRefs` point at a **missing Gateway** (same- or cross-namespace). **Backend Service / port / ReferenceGrant** checks still require the Service lister; **topology** checks (class + parent) run even when Services aren’t available. > > **Issue taxonomy** maps `Missing GatewayClass` to **gateway_not_ready** and `Missing Gateway parent` to **gateway_route_invalid**; user-facing catalog copy is updated accordingly. > > **Dedupe** no longer drops every `ResolvedRefs:*` condition when any structural missing-ref exists on the route. It only hides **matching** controller echoes (e.g. backend missing → `BackendNotFound` / `PortNotFound`; ReferenceGrant → `RefNotPermitted`). A **missing parent** structural row does **not** suppress unrelated `ResolvedRefs` conditions. > > **Dynamic cache authority**: new `HasWatchedInSyncedNamespace` returns “missing” only when the relevant informer has **synced** for that namespace (including during informer scope replacement). **KEDA `Rollout` scaleTargetRefs** use the same rule so partial watches don’t emit false **missing scaleTargetRef** issues. Initial add-event suppression is renamed/clarified so it isn’t confused with sync authority. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 93ee479. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
make buildmake testmake tscgo test ./internal/issues ./internal/k8sgo test ./...frompkg/k8score/radar-test-nonprod: grace suppression, both findings present, target creation recovery, and fixture cleanupStack
Linear: RAD-346
Note
Medium Risk
Changes live issue detection for Gateway networking and dynamic-cache “absence” semantics; incorrect authority or dedupe could hide real problems or briefly miss issues during informer sync, but behavior is heavily tested and biased toward silence when coverage is incomplete.
Overview
Extends Gateway API missing-reference detection beyond route backend Services: after a 2-minute grace, it flags Gateways with a non-existent
spec.gatewayClassNameand routes (HTTPRoute,GRPCRoute,TCPRoute,TLSRoute) whoseparentRefspoint at a missing Gateway (same- or cross-namespace). Backend Service / port / ReferenceGrant checks still require the Service lister; topology checks (class + parent) run even when Services aren’t available.Issue taxonomy maps
Missing GatewayClassto gateway_not_ready andMissing Gateway parentto gateway_route_invalid; user-facing catalog copy is updated accordingly.Dedupe no longer drops every
ResolvedRefs:*condition when any structural missing-ref exists on the route. It only hides matching controller echoes (e.g. backend missing →BackendNotFound/PortNotFound; ReferenceGrant →RefNotPermitted). A missing parent structural row does not suppress unrelatedResolvedRefsconditions.Dynamic cache authority: new
HasWatchedInSyncedNamespacereturns “missing” only when the relevant informer has synced for that namespace (including during informer scope replacement). KEDARolloutscaleTargetRefs use the same rule so partial watches don’t emit false missing scaleTargetRef issues. Initial add-event suppression is renamed/clarified so it isn’t confused with sync authority.Reviewed by Cursor Bugbot for commit 93ee479. Bugbot is set up for automated code reviews on this repo. Configure here.