Webhook to enable External-DNS to talk to Tidy-DNS.
This webhook is still work in progress and represents a minimal viable product.
For general development one should have the Golang environment installed.
For deployment only Docker is necessary.
Tidy username and password are provided through the environment variables
TIDYDNS_USER
and TIDYDNS_PASS
.
The application arguments are as follows:
tidydns-endpoint
Tidy DNS server addrzone-update-interval
The time-duration between updating the zone informationlog-level
Application logging level (debug, info, warn, error)log-format
Application logging format (json or logfmt)read-timeout
Read timeout in duration format (default: 5s)write-timeout
Write timeout in duration format (default: 10s)
This application is strictly meant to run in a container as a sidecar to External-DNS in a Kubernetes environment. Refer to the External-DNS documentaion for how to configure it in this context.
Locally the application can be built and run to verify that it can talk to Tidy
DNS server and applications can be build around it to test the webhook
endpoints. Running the application locally assuming the binary is named
webhook
:
export TIDYDNS_USER='<tidy username>'
export TIDYDNS_PASS='<tidy password>'
./webhook --tidydns-endpoint='https://dnsadmin.company.com/index.cgi' --zone-update-interval='10m' --log-level='info'
All dependencies are included in the vendor/
directory. This makes the
repository significantly larger but also means that Docker is the only
requirement. Everything else is present. A benefit of this is that running CI
pipelines becomes lighter and faster because no external dependencies needs to
be downloaded before building and running tests.
An example of building a multiplatform image is shown below:
export VERSION=1.2.3
export REPO_PATH='registry.company.com/username/external-dns-tidydns-webhook'
export PLATFORMS='linux/amd64,linux/arm64'
docker buildx build --platform=$PLATFORMS --tag $REPO_PATH:$VERSION --push .
If building for the local platform is sufficient, the regular build/push commands can be used:
export VERSION=1.2.3
export REPO_PATH='registry.company.com/username/external-dns-tidydns-webhook'
docker build --tag $REPO_PATH:$VERSION .
docker push $REPO_PATH:$VERSION
Building the application locally for testing:
go build ./cmd/webhook/
- An effort should be made to use tidydns-go instead of the local tidydns package
- So far the supported record types are A, AAAA and CNAME
- More GitHub actions
- Relase pipeline