Repository navigation
gatewayendpoint: keep an authorized hostname across a listener-only receipt change (APT-1361) - #30
Merged
Merged
Conversation
…eceipt change (APT-1361) - A receipt that differs from the current binding only by listener digest no longer withdraws the hostname when the route is still in an allowed namespace (All, or Same/default with the Gateway namespace; Selector fails closed), the listener still permits HTTPRoute, and the established targets are unchanged. - While the route parent is Accepted the receipt is refreshed to the new listener digest; while it is Unknown the old receipt is kept unchanged until admission can refresh it. Accepted=False, cross-namespace routes the new policy rejects, removed listeners, changed targets and route UID/generation mismatches still withdraw. - Fresh minting and Gateway UID replacement are unchanged. On appthrust.ink, closing Project Gateway listeners from All to Same changed every listener digest, removed every published hostname, deleted or emptied the EndpointRecordSets, pruned their RecordSets and deleted the Route 53 answers; recreation took about two minutes.
…kinds (APT-1361) - With allowedRoutes.kinds omitted, listener-only receipt continuity now requires an HTTP or HTTPS listener, so a same-name listener changed to TLS/TCP/UDP withdraws the hostname. - Tests: HTTPS->TLS, address loss then a different target, Unknown then Rejected, Unknown then hostname mismatch; each first proves retention, then withdrawal through the provider. - Docs: parent acceptance means the observedGeneration matching the current HTTPRoute generation. Review F1/F2/F5 (probe-opus) on #30.
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.
Why (APT-1361)
On appthrust.ink, platform #7157 closed existing Project Gateway listeners from
allowedRoutes.namespaces.from: AlltoSame. The admission receipt storessha256(json.Marshal(listener))(receipt.go), so every listener digest changed;conflictsCurrentBindingthen dropped every published hostname even though the routes stayed Accepted and their targets were unchanged. Events at 11:55:46Z:HostnameRemoved×n andEndpointRecordSetDeleted;RecordSetPruned×26; Route 53 change submitted 11:55:49Z; recreated RecordSets Programmed only at 11:57:46–11:58:20Z. All 13 published hosts were unreachable for 2–3 minutes (wildcard answer, TLS name mismatch).Change
A receipt that differs from the current binding only by listener digest (same hostname, route namespace/name/UID/generation, Gateway UID/class, parentRef, listener name) is continued when all hold:
All, orSame/default with the route in the Gateway namespace;Selectorfails closed (no Namespace read added); explicit kinds must includegateway.networking.k8s.io/HTTPRoute(httproute.go:122);controller.go:272-275);controller.go:291-293,321-330).Still withdrawn as before:
Accepted=False, a cross-namespace route the new policy rejects, a removed listener, changed targets, a different route UID/generation, a disallowed kind. Fresh minting and Gateway UID replacement are unchanged. No new RBAC, errors, or reads.Known, unchanged (separate issue)
After a correct withdrawal (e.g. cross-namespace under
Same) and full ERS cleanup, a still-Acceptedroute status can mint the hostname again (controller.go:296-311), because fresh minting trusts route acceptance. Pre-existing; route acceptance freshness belongs to the Gateway controller.Tests
receipt_continuity_test.go: SameNamespaceAccepted, SameNamespaceUnknownThenAccepted (ERS UID/spec/resourceVersion and receipt unchanged while Unknown; digest refreshed after Accepted; RecordSets unchanged and no provider DELETE/UPSERT in both phases), CrossNamespaceRejected/Unknown, ListenerRemoved, UnknownWithChangedTarget, UnknownWithRemovedListener, UnknownWithRejectedKind, RouteRejected, plus Selector/class/stale-generation/hostname-mismatch negatives.go test -count=1 ./internal/go/apps/gatewayendpoint/controllers/gatewayPASS (fake clients).go vetclean.Authorship
Written by gpt-6.2-astra (deep-worker); commit by bugfixer. Review: Claude family (record
po/lead-2026-11-14/reviews/dns-api-apt1361-continuity-security-review-bugfixer.md). Platform consumes this through a dns-api release and a pin update inhack/upstream-artifacts/shared-runtime-reviewed-imports.yaml.