What would you like to be added?
A flag (e.g., --gateway-route-require-accepted) to control whether external-dns checks the Accepted condition before producing endpoints from HTTPRoutes. When disabled, external-dns would use hostnames from the route spec regardless of acceptance status — only deleting DNS when the route object is actually removed.
Why is this needed?
When an HTTPRoute transitions from Accepted=True to Accepted=False (e.g., due to a bad config push), external-dns with --policy=sync deletes the DNS records — even though the route object still exists and the data plane may still be serving traffic.
gwRouteIsAccepted() in source/gateway.go returns false → zero endpoints → sync deletes the owned DNS records. This treats "temporarily invalid" the same as "intentionally removed."
Impact: A misconfiguration that would otherwise only affect routing now causes a full DNS outage. The only workaround is --policy=upsert-only, which disables all cleanup and requires manual orphan management.
Reproduction
- Create a Gateway + HTTPRoute →
Accepted=True → DNS records created
- Push invalid change to HTTPRoute → Gateway sets
Accepted=False
- external-dns deletes DNS A + TXT records for that route
level=info msg="Del records: my-app.example.com. A [something] 300"
level=info msg="Del records: a-my-app.example.com. TXT [\"heritage=external-dns,...\"] 300"
Related issues
What would you like to be added?
A flag (e.g.,
--gateway-route-require-accepted) to control whether external-dns checks theAcceptedcondition before producing endpoints from HTTPRoutes. When disabled, external-dns would use hostnames from the route spec regardless of acceptance status — only deleting DNS when the route object is actually removed.Why is this needed?
When an HTTPRoute transitions from
Accepted=TruetoAccepted=False(e.g., due to a bad config push), external-dns with--policy=syncdeletes the DNS records — even though the route object still exists and the data plane may still be serving traffic.gwRouteIsAccepted()insource/gateway.goreturnsfalse→ zero endpoints → sync deletes the owned DNS records. This treats "temporarily invalid" the same as "intentionally removed."Impact: A misconfiguration that would otherwise only affect routing now causes a full DNS outage. The only workaround is
--policy=upsert-only, which disables all cleanup and requires manual orphan management.Reproduction
Accepted=True→ DNS records createdAccepted=FalseRelated issues