Git Product home page Git Product logo

Comments (3)

karlschriek avatar karlschriek commented on July 18, 2024

A bit more diagnostic information:

The Azure DNS zone is "mysubdomain.mydomain.net", so the routing above happens an A-record set on "@".

If I instead change the istio VirtualService to have a DNS of "foobar.mysubdomain.mydomain.net", the behaviour changes and is correct, and the "mysubdomain.mydomain.net" there are the following records:

a-foobar A
foobar A
foobar TXT
time="2024-06-18T09:06:33Z" level=debug msg="Found 1 Azure DNS zone(s)."
time="2024-06-18T09:06:33Z" level=debug msg="Found A record for 'mydomain.mysubdomain.net' with target 'xxx.xxx.xxx.xxx'."
time="2024-06-18T09:06:33Z" level=debug msg="Failed to extract targets for 'mydomain.mysubdomain.net' with type 'NS'."
time="2024-06-18T09:06:33Z" level=debug msg="Found TXT record for 'mydomain.mysubdomain.net' with target '\"heritage=external-dns,external-dns/owner=default,external-dns/resource=virtualservice/foobar/foobar\"'."
time="2024-06-18T09:06:33Z" level=debug msg="Found TXT record for 'a-foobar.mydomain.mysubdomain.net' with target '\"heritage=external-dns,external-dns/owner=default,external-dns/resource=virtualservice/foobar/foobar\"'."
time="2024-06-18T09:06:33Z" level=debug msg="Found A record for 'foobar.mydomain.mysubdomain.net' with target 'xxx.xxx.xxx.xxx'."
time="2024-06-18T09:06:33Z" level=debug msg="Found TXT record for 'foobar.mydomain.mysubdomain.net' with target '\"heritage=external-dns,external-dns/owner=default,external-dns/resource=virtualservice/foobar/foobar\"'."
time="2024-06-18T09:06:33Z" level=debug msg="Endpoints generated from VirtualService: foobar/foobar: [foobar.mydomain.mysubdomain.net 0 IN A  xxx.xxx.xxx.xxx []]"

So the issue can be narrowed down to when routing to "@".

from external-dns.

dongjiang1989 avatar dongjiang1989 commented on July 18, 2024

Maybe by design. @ as for root

func (p *AzureProvider) recordSetNameForZone(zone string, endpoint *endpoint.Endpoint) string {
	// Remove the zone from the record set
	name := endpoint.DNSName
	name = name[:len(name)-len(zone)]
	name = strings.TrimSuffix(name, ".")

	// For root, use @
	if name == "" {
		return "@"
	}
	return name
}

ref: https://learn.microsoft.com/en-us/azure/dns/dns-zones-records#record-names

from external-dns.

karlschriek avatar karlschriek commented on July 18, 2024

Well, yes. In DNS you denote the root zone with an "@", so... I am not sure what you are getting at?

external-dns is setting the dns records correctly. The problem is that is that when the record is for the root it updates it every time, instead of just logging that it found an existing record and will do nothing.

from external-dns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.