mecodia / cert-manager-webhook-hetzner

A cert-manager integration with Hetzner DNS
Apache License 2.0
17 stars 12 forks source link

Problem with multiples zones #10

Open bernatvadell opened 1 year ago

bernatvadell commented 1 year ago

Good afternoon!

I'm having a problem using the solver, in my case, I have several zones created.

I0613 15:22:57.860221       1 dns.go:88] cert-manager/challenges/Present "msg"="presenting DNS01 challenge for domain" "dnsName"="echo.domain1.com" "domain"="echo.domain1.com" "resource_kind"="Challenge" "resource_name"="echo-wildcard-tls-secret-<omited>" "resource_namespace"="default" "resource_version"="v1" "type"="DNS-01"
E0613 15:22:58.360720       1 controller.go:167] cert-manager/challenges "msg"="re-queuing item due to error processing" "error"="domain did not yield exactly 1 zone result but 2: [Zone 'domain2.com' (<omited>) Zone 'domain1.com' (<omited>)]" "key"="default/echo-wildcard-tls-secret-<omited>"

I have tried to make the query through the api:

https://dns.hetzner.com/api/v1/zones?search_name=domain1.com

And it only returns a zone.

I've been looking at the code, and my suspicions are that the value of "zone" is not being retrieved correctly:

req, err := http.NewRequest("GET", "https://dns.hetzner.com/api/v1/zones?search_name="+zone, nil)
toabi commented 9 months ago

Weird. I think I'll replace search_name with name in the next release… https://dns.hetzner.com/api-docs#operation/GetZones

That might solve it? Although weird that you direct testing of the API worked…