fix(serviceoffer): gate httpRouteAccepted on observedGeneration, fail closed#781
Merged
bussyjd merged 1 commit intoJul 16, 2026
Merged
Conversation
…tion httpRouteAccepted ignored status.parents[].conditions[].observedGeneration, so the #767 route-acceptance gate (apply -> Get -> httpRouteAccepted before RoutePublished=True) was bypassed for updates to an already-accepted HTTPRoute: the Get right after applyObject could return the PREVIOUS generation's Accepted=True/ResolvedRefs=True, flipping RoutePublished True even though Traefik hasn't reconciled the new spec yet (and may go on to reject it). httpRouteAccepted now requires each trusted condition's observedGeneration to equal the route's metadata.generation; a stale condition is skipped, so the parent falls through to not-accepted and the existing 5s requeue re-checks. Both the main and host route accept-gates (controller.go ~852-874) go through this same function. Claude-Session: https://claude.ai/code/session_014YjPMViNrZ7zBVgUQzwEKk
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.
Medium from the PR #756 review. The #767 route-acceptance gate trusted stale parent conditions, so an UPDATE to an already-accepted HTTPRoute flipped RoutePublished True before Traefik reconciled the new spec. httpRouteAccepted now requires each trusted condition's observedGeneration to match metadata.generation, and both Accepted and ResolvedRefs must be affirmatively True at the current generation (ResolvedRefs no longer defaults true — that was fail-open). Covers all three call sites. New mixed-staleness regression tests.
https://claude.ai/code/session_014YjPMViNrZ7zBVgUQzwEKk