Skip to content

external-dns deletes DNS records when HTTPRoute transitions to Accepted=False (route still exists) #6309

@sedflix

Description

@sedflix

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

  1. Create a Gateway + HTTPRoute → Accepted=True → DNS records created
  2. Push invalid change to HTTPRoute → Gateway sets Accepted=False
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions