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/external-dns-webhook.

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
26provider:
27  name: webhook
28  webhook:
29    image: ghcr.io/anexia/external-dns-webhook
30    tag: v0.1.6
31    env:
32      - name: LOG_LEVEL
33        value: debug # reduce in production
34      - name: ANEXIA_API_URL
35        value: <ANEXIA_API_URL>
36      - name: ANEXIA_API_TOKEN
37        valueFrom:
38          secretKeyRef:
39            name: anexia-credentials
40            key: token
41      - name: SERVER_HOST
42        value: "0.0.0.0"
43      - name: DRY_RUN
44        value: "false"
45EOF
46
47# install external-dns with helm
48helm upgrade -i external-dns-anexia external-dns/external-dns -f external-dns-anexia-values.yaml