Skip to content

--service-type-filter=ClusterIP + headless service with external-dns.alpha.kubernetes.io/endpoints-type=NodeExternalIP does not produce records #5867

@babinin

Description

@babinin

What happened:
When using external-dns with the --service-type-filter=ClusterIP flag, headless services annotated with external-dns.alpha.kubernetes.io/endpoints-type=NodeExternalIP do not result in any DNS records being created.

What you expected to happen:
Records should be created for headless services that are explicitly annotated with external-dns.alpha.kubernetes.io/endpoints-type=NodeExternalIP, even if --service-type-filter=ClusterIP is enabled.

How to reproduce it (as minimally and precisely as possible):

  1. Deploy ExternalDNS with:

    --source=service
    --service-type-filter=ClusterIP
    --fqdn-template={{.Name}}.{{.Namespace}}.cluster.com
    
  2. Create a headless service:

    apiVersion: v1
    kind: Service
    metadata:
      name: test-headless
      annotations:
        external-dns.alpha.kubernetes.io/endpoints-type: NodeExternalIP
    spec:
      clusterIP: None
      selector:
        app: my-app
      ports:
      - port: 80
        targetPort: 80
  3. Observe that no DNS records are created for test-headless.default.cluster.com..

Environment:

  • External-DNS version: v0.19.0
  • DNS provider: google
  • Kubernetes version: v1.32.2, v1.33.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions