-
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
new pi-hole server v6 results in 404 error #5113
Comments
Hi. We recently had quite few pi-hole related issues. This is open-source project If you have time would you mind update a dev guide how to configure lab with external-dns and pi-hole? I think the actual how to install pi-hole is missing. |
/help |
@ivankatliarchuk: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed 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-sigs/prow repository. |
are there any current workarounds to it? |
@thebigbone sticking with pi-hole v5 until |
It's an open source project. So someone could submit a pull request. My understanding it should support old and new pi-hole versions at least for a while. |
you're right. I am no expert in k8s but I will still look into it and hopefully atleast figure out what's wrong. |
well what's wrong is that pihole 6 changed api endpoints so we need to update the integration https://github.com/kubernetes-sigs/external-dns/blob/master/provider/pihole/client.go#L278 |
Just adding some info here to save others some research time: It's unfortunately more than just the auth part. The old PHP scripts that were getting called are (likely) no longer available either. There is now a REST API, but it's a significant rework of the current pihole provider. For any maintainers, I'm curious how you might tackle this:
I can confirm that testing CURL commands on my v6 install (I naively upgraded recently 😢) did work for adding/deleting A records with something like: GET current list
Add A record
Delete A Record
Note Note, that it needs the full IP address + hostname combination for DELETE. In other words
won't work. On the plus side, the REST+JSON api lends itself nicely to go's structs and parsing, so that would be cleaner in v6. And, the API docs are self-hosted by the pihole at http://pi.hole/api/docs |
Hello, I can start working on this one WIP => https://github.com/tJouve/external-dns/tree/feat/piholev6 |
There is no specific endpiont to find out the pi-hole version if aunautrhosed. One could do First probe to validate where or not auth is required and is v6
If not found, it's an older version. Do
|
Probably no point to support V5 and V6, as V5 is supported on older versions of external-dns |
@ivankatliarchuk so you think i can drop support for the previous version ? My plan was to add a config to specify the api version, with default 5. If 6 is specified I use the V6 client. |
Is quite expensive to support both versions aka bee backward compatible. Having a flag for that, sounds reasonable as well. There is another option to create a pi-hole webhook but not sure if someone would trust that provider in home network. I let you to decide. |
Using a configurable flag for now seems like the better option IMO. Things might change at the kubernetes side whereas v5 will stay working the same way, in which case users would be forced to upgrade. You could mark v5 as deprecated and remove it in a later version of external-dns, but for now the better path is probably to use a configurable api version, defaulting to |
Is there something I can do to actively help you @tJouve ? I have a bit of spare time and I am a bit familiar with Go (though by no means a lot). I am also in the process of setting up my homelab cluster and would love for it to communicate with my PiHole, which turned out to be V6. If there's something I can do (review, implement something, test), let me know. |
@divStar Sure, I can add you on my fork.
|
What happened: external-dns started reporting a 404 error.
What you expected to happen:
A non-error
How to reproduce it (as minimally and precisely as possible):
Use pi-hole docker image
2025.02.0
or higherAnything else we need to know?:
Started happening since (I think) my pi-hole server got updated to docker tag
2025.02.0
. Which now is based on the new pi-hole server v6.It appears that pi-hole now uses the endpoint
/api/auth
for authentication instead: https://docs.pi-hole.net/api/auth/Environment:
external-dns --version
): helm chart1.15.2
reports imageregistry.k8s.io/external-dns/external-dns:v0.15.1
2025.02.3
The text was updated successfully, but these errors were encountered: