This application serves as a reverse proxy for the PowerDNS Admin service. It forwards incoming HTTP requests to a specified backend and also provides metrics and logging capabilities.
- Go 1.21 or higher
- Git
-
Clone the repository:
git clone https://github.com/supporttools/powerdns-admin-proxy.git
-
Change to the directory:
cd powerdns-admin-proxy
-
Edit Helm values
vi ./charts/powerdns-admin-proxy/values.yaml
NOTE: You will need to change the
backendUrl
to the URL of your PowerDNS Admin service and the ingress host to the hostname of your PowerDNS Admin service. -
Install Helm chart:
helm upgrade --install pdns-proxy -n powerdns --create-namespace ./charts/powerdns-admin-proxy
The application can be configured using environment variables.
PORT
: The port where the proxy listens for incoming HTTP requests. Default is8080
.BACKEND_URL
: The URL of the backend service where requests will be forwarded. Default ishttp://powerdns-server:8081
.DEBUG
: Enable debug logging. Set this totrue
to enable.
For example:
export PORT=8080
export BACKEND_URL=http://powerdns-server:8081
export DEBUG=true
To build the application:
go build -o powerdns-admin-proxy
This will compile the code and generate an executable named powerdns-admin-proxy
.
After building, you can run the application as follows:
./powerdns-admin-proxy
Prometheus metrics are available at http://localhost:9000/metrics
.
A simple health check endpoint is available at http://localhost:8080/healthz
.
Debugging logs are enabled by setting the DEBUG
environment variable to true
.
This project is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.