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

AWS Route53 and headless service: extra root domain record is created

Open RossAtOnfinality opened this issue 3 years ago • 1 comments

What happened: According to the document: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/hostport.md if we use example.org as root domain in Annotation, 3 dns records of the subdomains will be created:

kafka-0.example.org
kafka-1.example.org
kafka-2.example.org

WX20220621-160345

While using AWS Route53 and headless service, I noticed an extra dns record of the root domain was created. For example, using test.example.org as root domain in Annotation will create the following records:

test.example.org
kafka-0.test.example.org
kafka-1.test.example.org
kafka-2.test.example.org

What you expected to happen:

Is there is any reason for creating test.example.org record? Or is there any way to avoid creating this record?

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

apiVersion: v1
kind: Service
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/hostname: test.example.org
    route53: "true"
  name: test-service
  namespace: test
spec:
  clusterIP: None
  ports:
  - name: http
    port: 9000
    protocol: TCP
    targetPort: 9000
  selector:
    release: test-service
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

Anything else we need to know?:

Environment:

  • External-DNS version (use external-dns --version): V0.12.0
  • DNS provider: AWS Route53
  • Others: arguments for external-dns:
      --annotation-filter=route53=true                                                                                                                                                      
      --source=service                                                                                                                                                                      
      --source=ingress                                                                                                                                                                      
      --domain-filter=example.org                                                                                                                                                                                                                                                                                                         
      --provider=aws                                                                                                                                                                        
      --aws-prefer-cname                                                                                                                                                                    
      --registry=txt                                                                                                                                                                        
      --txt-prefix=_                                                                                                                                                                        
      --txt-owner-id=cluster-sy-external-dns   

RossAtOnfinality avatar Jun 21 '22 04:06 RossAtOnfinality

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 19 '22 05:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 19 '22 05:10 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Nov 18 '22 06:11 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 18 '22 06:11 k8s-ci-robot

Still an issue, and leads to a greater issue.

Having one or multiple headless services that target pods on the same node will break external dns, since duplicate records are in the request to route53 for the root dns.

External dns goes into an infinite crash loop.

Example logs from cloudtrail where two of the pods are on the same node:

{"action":"UPSERT","resourceRecordSet":{"name":"example.com","type":"A","tTL":300,"resourceRecords":[{"value":"10.5.25.120"},{"value":"10.5.25.253"},{"value":"10.5.31.11"},{"value":"10.5.31.11"}]}}

ItielOlenick avatar Feb 24 '24 19:02 ItielOlenick

/remove-lifecycle rotten

ItielOlenick avatar Feb 24 '24 19:02 ItielOlenick

/reopen

ItielOlenick avatar Feb 24 '24 19:02 ItielOlenick

@ItielOlenick: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Feb 24 '24 19:02 k8s-ci-robot