Skip to content

neticdk/external-dns-tidydns-webhook

Repository files navigation

External-DNS Tidy Webhook

Webhook to enable External-DNS to talk to Tidy-DNS.

This webhook is still work in progress and represents a minimal viable product.

Prerequisites

For general development one should have the Golang environment installed.

For deployment only Docker is necessary.

User Guide

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 addr
  • zone-update-interval The time-duration between updating the zone information
  • log-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'

Developer Guide

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/

Known Issues and Limitations

  • 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

About

Webhook to enable External-DNS to talk to Netic's TidyDNS

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 6