-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated UltraDns API #2780
Comments
@slimshetty Could you try running at a verbosity level and post the results? |
@Volatus I have pasted both the debug level and verbose level( --log-level=warning ) logs below. pls note i have edited the debug logs to hide the record names and ips. From the debug logs it is clear that the ultradns api (https://api.ultradns.com/zones/?&q=name:tv3cloud.com&offset=0&limit=1000) is not returning any zones and hence external dns is not matching our records. The api needs to be updated to https://api.ultradns.com/v3/zones/ DEBUG LEVEL 2022/07/05 05:11:31 [DEBUG] HTTP Request: &{Method:GET URL:https://api.ultradns.com/zones/?&q=name:tv3cloud.com&offset=0&limit=1000 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Accept:[application/json] Content-Type:[application/json] Ultraclient:[kube-client] User-Agent:[udnssdk-go/0.1]] Body:{} GetBody:0x6c0780 ContentLength:0 TransferEncoding:[] Close:false Host:api.ultradns.com Form:map[] PostForm:map[] MultipartForm: Trailer:map[] RemoteAddr: RequestURI: TLS: Cancel: Response: ctx:0xc000058018} VERBOSE LEVEL 2022/07/05 05:20:40 [DEBUG] HTTP Response: &{Status:200 OK StatusCode:200 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Access-Control-Allow-Headers:[Origin, X-Requested-With, Content-Type, Accept, Authorization, UltraClient] Access-Control-Allow-Methods:[POST, GET, OPTIONS, DELETE, PUT, PATCH] Access-Control-Allow-Origin:[] Access-Control-Max-Age:[3600] Connection:[keep-alive] Content-Type:[application/json] Date:[Tue, 05 Jul 2022 05:20:39 GMT] Vary:[Origin Access-Control-Request-Method Access-Control-Request-Headers Accept-Encoding, User-Agent]] Body:0xc000af3780 ContentLength:-1 TransferEncoding:[] Close:false Uncompressed:true Trailer:map[] Request:0xc00046eb00 TLS:0xc0001aa0b0} |
The UltraDNS SDK was outdated by about 2 years or more. There has been many new releases of the SDK that's more stable so we should update. Might also help with kubernetes-sigs#2780 Signed-off-by: Ismayil Mirzali <[email protected]>
@slimshetty I've gone through the code and made a PR to update the Go SDK for UltraDNS to be a much newer version, hoping that fixes the problem. If the PR gets merged, this thread will close but feel free to reopen the issue and @ me and I'll take what we can do to fix it. |
@Volatus i made these changes locally and built a new image. Tested the new image it did not fix the issue. I also tried changing the ultradns base url to https://api.ultradns.com/v3/ after that i see these 404 logs time="2022-07-06T10:04:27Z" level=error msg="Get "https://api.ultradns.com/v3/zones/?&q=name:tv3cloud.com&offset=0&limit=1000\": oauth2: cannot fetch token: 404 Not Found\nResponse: [{"errorCode":404,"errorMessage":"Not Found"}]" |
@Volatus Updating the ultradns sdk and calling the ultradns api using the base url https://api.ultradns.com/zones did not work, still not returning any zones.
I dont think they have updated the docs , also the golang ultradns sdk has not been updated since 2020 I think we should use this sdk instead which is more up to date and uses /v3 to get zones info |
@slimshetty If the 2nd SDK you mentioned worked with your testing, then I can look into migrating the provider to the other one. Can you confirm it worked with the v3 API on the new SDK? |
@Volatus instead of using the new sdk which would require to rewrite the entire ultradns.go I updated the zones uri in the existing sdk. Along with the uri there are some changes to the pagination info the api returns. It does not return ResultInfo anymore and instead returns CursorInfo with page id of first, next , previous and last pages. More details on the change can be found here : https://docs.ultradns.neustar/Content/REST%20API/Content/REST%20API/Zone%20API/Zone%20API.htm Tested these changes locally and built an image and all functionality seems to be working fine now, will soon raise a PR here |
@Volatus can you help with raising a pr here i am not able to, i have updated the sdk and tested it out locally there seems to be no issues. I was not able to update the existing repo so i forked it and made the changes Along with updating the imports also need to update the pagination logic currently the logic is to get the resultInfo and use offset to query the api but this has been changed to cursorinfo and page id, so it will require few changes in ultradns.go and ultradns_test.go. I have copied the changes i did locally to make this work into a file , can you review and raise a pr with these changes This link has more info on the updated api |
@shettyvaishak Sure I can try and help out. The diff you provided does not apply though, can you make sure your fork is up-to-date with the upstream and recreate the patch? You can email it to me. (email should be available on github profile) You can create the patch using |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
What happened:
External Dns failing to create dns records in UltraDns. The domain name filter that is provided is tv3cloud.com , but external dns is skipping records with this domain name.
POD LOGS
time="2022-05-31T08:07:41Z" level=info msg="Skipping record txt-k8sprom-a.play.mr.tv3cloud.com. because no hosted zone matching record DNS Name was detected"
DEPLOYMENT ARGS:
args:
--source=service
--source=ingress
--domain-filter=tv3cloud.com
--provider=ultradns
--txt-prefix=txt-
--registry=txt
value: "https://api.ultradns.com/"
What you expected to happen:
The records matching the domain should be created
How to reproduce it (as minimally and precisely as possible):
Setup a zone in ultradns, create a deployment of external dns using the ultradns provider, check if dns records are created
Anything else we need to know?:
I raised a support ticket with external dns and found out that the zones api is deprecated (https://api.ultradns.com/zones/) and replaced by -> https://api.ultradns.com/v3/zones/
i have tried changing the base url in the deployment from https://api.ultradns.com/zones/ to https://api.ultradns.com/v3/zones/ but it gave me 404 not found. However when i tried the new url from postman it worked. I suppose there are some changes required from external dns to support the new api??
Environment:
external-dns --version
): 0.10.2The text was updated successfully, but these errors were encountered: