Skip to content
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

pdns: optional custom API version #2019

Merged
merged 4 commits into from Jan 27, 2024

Conversation

m0t1x
Copy link
Contributor

@m0t1x m0t1x commented Sep 19, 2023

Some PowerDNS servers don't have exposed the root API endpoints and PowerDNS API version auto-detection fails. Use the optional parameter PDNS_CUSTOM_API_VERSION to set the version number in such situations.

related to #2016

@ldez
Copy link
Member

ldez commented Oct 24, 2023

Do we agree that I close the issue and flag it as "question" and you still created a PR?
What exactly do you expect from this behavior?

@m0t1x
Copy link
Contributor Author

m0t1x commented Oct 25, 2023 via email

@7c
Copy link

7c commented Nov 25, 2023

I agree, powerdns 4.* does not have this endpoint, so i had to hack into the code in order to set the apiVersion to 1.

I am setting PDNS_API_URL=https://server/api/v1 - all works until the PATCH command. The patch command is using zone.URL as path and it is coming from pdns "url": "/api/v1/servers/localhost/zones/domain.com." - since we do call a c.Host.JoinPath inside pdns/client.go/joinPath function. It automatically does the url as "/api/v1/api/v1/servers/localhost/zones/domain.com" at PATCH (UpdateRecords call inside pdns/internal/client.go)

@ldez ldez force-pushed the feature/pdns_custom_api_version branch from f04c8df to 7b2b7e6 Compare January 27, 2024 21:38
@ldez ldez changed the title Optional custom API version for PowerDNS pdns: optional custom API version Jan 27, 2024
@ldez ldez added this to the v4.15 milestone Jan 27, 2024
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if I disagree with the fact of opening a PR when an issue was closed, I will merge this PR anyway.
I hope this will not happen again and discussion will happen inside the issue BEFORE opening a PR.

@ldez ldez enabled auto-merge (squash) January 27, 2024 21:50
@ldez ldez merged commit 9c1a856 into go-acme:master Jan 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants