Skip to content

Commit a29c0be

Browse files
committed
add external dns
1 parent 4c6b0a6 commit a29c0be

8 files changed

+68
-1
lines changed

deploy-all.sh

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ cd ..
77
cd internal
88
./deploy-internal.sh
99
cd ..
10+
11+
cd externaldns
12+
./deploy-externaldns.sh
13+
cd ..

externaldns/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# externaldns
2+

externaldns/deploy-externaldns.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if ! which -s kubectl; then
4+
echo "kubectl command not installed"
5+
exit 1
6+
fi
7+
8+
kubectl apply -f externaldns-rbac.yaml
9+
kubectl apply -f externaldns-deployment.yaml
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: external-dns
5+
spec:
6+
strategy:
7+
type: Recreate
8+
template:
9+
metadata:
10+
labels:
11+
app: external-dns
12+
spec:
13+
containers:
14+
- name: external-dns
15+
image: registry.opensource.zalan.do/teapot/external-dns:v0.4.5
16+
args:
17+
- --source=ingress
18+
- --domain-filter=theddsandbox.com
19+
- --provider=aws
20+
- --registry=txt
21+
- --txt-owner-id=stakater
22+
serviceAccountName: external-dns

externaldns/externaldns-rbac.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: external-dns
5+
---
6+
apiVersion: rbac.authorization.k8s.io/v1beta1
7+
kind: ClusterRoleBinding
8+
metadata:
9+
name: external-dns-viewer
10+
roleRef:
11+
apiGroup: rbac.authorization.k8s.io
12+
kind: ClusterRole
13+
name: view
14+
subjects:
15+
- kind: ServiceAccount
16+
name: external-dns
17+
namespace: default

externaldns/teardown-externaldns.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if ! which -s kubectl; then
4+
echo "kubectl command not installed"
5+
exit 1
6+
fi
7+
8+
kubectl delete -f externaldns-rbac.yaml
9+
kubectl delete -f externaldns-deployment.yaml

internal/ingress/nginx-ingress-controller-service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ spec:
2020
selector:
2121
k8s-app: internal-ingress-lb
2222
loadBalancerSourceRanges:
23-
- 2.69.164.194/32
23+
- 83.226.238.69/32

teardown-all.sh

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ cd ..
77
cd internal
88
./teardown-internal.sh
99
cd ..
10+
11+
cd externaldns
12+
./teardown-externaldns.sh
13+
cd ..

0 commit comments

Comments
 (0)