go.anx.io/external-dns-webhook


external-dns for Anexia CloudDNS

License Build GoReport Coverage

The Anexia Webhook Provider for ExternalDNS allows you to use Anexia’s DNS API to manage DNS records for your domains.

The provider is heavily inspired by the ExternalDNS - IONOS Webhook and some inspiration taken from the External DNS - Adguard Home Provider.

The initial work was by done by @ProbstenHias, who still serves as the primary maintainer. Thanks a lot! :purple_heart:

Configuration

See cmd/webhook/init/configuration/configuration.go for all available configuration options for the webhook sidecar, and internal/anexia/configuration.go for all available configuration options for the Anexia provider.

Kubernetes Deployment

The Anexia Webhook Provider is provided as an OCI image in ghcr.io/anexia/k8s-external-dns-webhook.

A full tutorial of the ExternalDNS in combination with Anexia CloudDNS can be viewed in the official ExternalDNS tutorials.

The following is an example deployment for the Anexia Webhook Provider:

 1helm repo add external-dns https://kubernetes-sigs.github.io/external-dns/
 2
 3# create the anexia configuration
 4kubectl create secret generic anexia-credentials \
 5    --from-literal=token='<ANEXIA_API_TOKEN>'
 6
 7# create the helm values file
 8cat <<EOF > external-dns-anexia-values.yaml
 9
10# -- ExternalDNS Log level.
11logLevel: debug # reduce in production
12
13# -- if true, _ExternalDNS_ will run in a namespaced scope (Role and Rolebinding will be namespaced too).
14namespaced: false
15
16# -- _Kubernetes_ resources to monitor for DNS entries.
17sources:
18  - ingress
19  - service
20  - crd
21
22extraArgs:
23  ## must override the default value with port 8888 with port 8080 because this is hard-coded in the helm chart
24  - --webhook-provider-url=http://localhost:8080
25  ## You should filter the domains that can be requested to limit the amount of requests done to the anexia engine.
26  ## This will help you avoid running into rate limiting.
27  ## Make sure to provide the same value to both the external-dns as well as the webhook via DOMAIN_FILTER or REGEXP_DOMAIN_FILTER.
28  - --domain-filter=your.domain.com
29
30provider:
31  name: webhook
32  webhook:
33    image:
34      repository: ghcr.io/anexia/k8s-external-dns-webhook
35      tag: v0.3.1
36    env:
37      - name: LOG_LEVEL
38        value: debug # reduce in production
39      - name: LOG_FORMAT
40        value: "json"
41      - name: ANEXIA_API_TOKEN
42        valueFrom:
43          secretKeyRef:
44            name: anexia-credentials
45            key: token
46      - name: SERVER_HOST
47        value: "0.0.0.0"
48      - name: SERVER_PORT
49        value: "8080"
50      - name: DRY_RUN
51        value: "false"
52      - name: DOMAIN_FILTER
53        value: "your.domain.com"
54#      - name: REGEXP_DOMAIN_FILTER
55#        value: "your.*\.com"
56      
57
58EOF
59
60# install external-dns with helm
61helm upgrade -i external-dns-anexia external-dns/external-dns -f external-dns-anexia-values.yaml