22
33External-DNS Webhook Provider to manage Netcup DNS Records
44
5+ > [ !INFO]
6+ > This repository is not affiliated with Netcup.
57
68> [ !WARNING]
79> Completely untested code. Might eat your DNS records. You have been warned.
@@ -33,6 +35,39 @@ Then apply one of the following manifests file to deploy external-dns.
3335
3436[ embedmd ] :# ( example/external-dns.yaml )
3537``` yaml
38+ apiVersion : v1
39+ kind : ServiceAccount
40+ metadata :
41+ name : external-dns
42+ ---
43+ apiVersion : rbac.authorization.k8s.io/v1
44+ kind : ClusterRole
45+ metadata :
46+ name : external-dns
47+ rules :
48+ - apiGroups : [""]
49+ resources : ["services","endpoints","pods"]
50+ verbs : ["get","watch","list"]
51+ - apiGroups : ["extensions","networking.k8s.io"]
52+ resources : ["ingresses"]
53+ verbs : ["get","watch","list"]
54+ - apiGroups : [""]
55+ resources : ["nodes"]
56+ verbs : ["list", "watch"]
57+ ---
58+ apiVersion : rbac.authorization.k8s.io/v1
59+ kind : ClusterRoleBinding
60+ metadata :
61+ name : external-dns-viewer
62+ roleRef :
63+ apiGroup : rbac.authorization.k8s.io
64+ kind : ClusterRole
65+ name : external-dns
66+ subjects :
67+ - kind : ServiceAccount
68+ name : external-dns
69+ namespace : default
70+ ---
3671apiVersion : apps/v1
3772kind : Deployment
3873metadata :
@@ -48,18 +83,22 @@ spec:
4883 labels :
4984 app : external-dns
5085 spec :
86+ serviceAccountName : external-dns
5187 containers :
5288 - name : external-dns
5389 image : registry.k8s.io/external-dns/external-dns:v0.14.0
5490 args :
91+ - --log-level=debug
5592 - --source=ingress
5693 - --source=service
5794 - --provider=webhook
5895 - name : external-dns-webhook-provider
59- image : ghcr.io/mrueg/external-dns-netcup-webhook:main
96+ image : ghcr.io/mrueg/external-dns-netcup-webhook:latest
97+ imagePullPolicy : Always
6098 args :
61- - --domain-filter="example.com"
62- - --netcup-customer-id="YOUR_CUSTOMER_ID"
99+ - --log-level=debug
100+ - --domain-filter=YOUR_DOMAIN
101+ - --netcup-customer-id=YOUR_ID
63102 env :
64103 - name : NETCUP_API_KEY
65104 valueFrom :
@@ -104,7 +143,8 @@ kind: Service
104143metadata :
105144 name : nginx
106145 annotations :
107- external-dns.alpha.kubernetes.io/hostname : example.com
146+ external-dns.alpha.kubernetes.io/hostname : test.example.com
147+ external-dns.alpha.kubernetes.io/internal-hostname : internaltest.example.com
108148spec :
109149 selector :
110150 app : nginx
0 commit comments