external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

Create DNS entries when using experimantal Gateway API ListenerSet

Open tolik93 opened this issue 8 months ago • 4 comments

Description: Currently, when defining an xListenerSet with attached HTTPRoutes, the expected DNS records are not created in ExternalDNS. This limits the usability of ListenerSets in experimental Gateway API implementations, as DNS resolution is a critical part of routing external traffic.

Steps to Reproduce:

Define a Gateway using xListenerSet with associated HTTPRoutes and hostnames.

Apply the manifests.

Observe that no corresponding DNS records are created by ExternalDNS.

Expected Behavior: ExternalDNS should detect the hostnames defined within xListenerSet + HTTPRoute configurations and create DNS records accordingly.

Actual Behavior: No DNS entries are created, even though the HTTPRoute and xListenerSet appear correctly configured and accepted by the Gateway controller.

tolik93 avatar Jul 29 '25 08:07 tolik93

Hi.

To be frank, it's very difficult to reproduce this issue with the steps provided. We can't expect others to be familiar with the specific features of external products like API Gateway. Without a comprehensive set of Kubernetes manifests, this issue will likely remain unresolved.

Supporting experimental features is challenging for us. Given that we're all volunteers, our time is limited while experimental means subject to change or never land in master.

ivankatliarchuk avatar Jul 29 '25 09:07 ivankatliarchuk

I'm also having issues with this and I can provide the manifest

apiVersion: gateway.networking.x-k8s.io/v1alpha1
kind: XListenerSet
metadata:
  name: app
  namespace: env
spec:
  parentRef: 
    name: gateway
    namespace: gateway
  listeners:
  - name: app-http
    hostname: nginx.thevenin.io
    port: 443
    protocol: HTTPS
    allowedRoutes:
      namespaces:
        from: Selector
        selector:
          matchLabels:
            name: env
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: app-
  namespace: env
  annotations:
    external-dns.alpha.kubernetes.io/hostname: nginx.thevenin.io
    external-dns.alpha.kubernetes.io/ttl: "300"
spec:
  hostnames:
    - nginx.thevenin.io
  parentRefs:
    - group: gateway.networking.x-k8s.io
      kind: XListenerSet
      name: app
      sectionName: app-http #Https listener
      namespace:  gateway
  rules:
    - backendRefs:
      - name: nginx 
        port: 80

currently it is working only for gateways as stated in the docs: Matching Gateways Matching Gateways are discovered by iterating over the *Route’s status.parents:

Ignores parents with a parentRef.group other than gateway.networking.k8s.io or a parentRef.kind other than Gateway.

If the --gateway-name flag was specified, ignores parents with a parentRef.name other than the specified value

gabrieloandco avatar Sep 03 '25 13:09 gabrieloandco

Also ran into this issue. In fact, when I added an XListenerSet resource, ExternalDNS removed all DNS entries for HTTP routes that use the listeners from the Gateway resource itself. Would be nice if this can be supported.

rolandkool avatar Sep 26 '25 09:09 rolandkool

external products like API Gateway

I think OP refers to the Gateway API, not the AWS service "API Gateway"

ctrahey avatar Nov 14 '25 22:11 ctrahey