Skip to content

Commit fec8041

Browse files
committed
chore: update readme to split the sections
1 parent 06e28fd commit fec8041

File tree

1 file changed

+52
-14
lines changed

1 file changed

+52
-14
lines changed

README.md

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,64 @@
2121

2222
## ⛵ Deployment
2323

24+
### Gathering your credentials
25+
26+
<details>
27+
<summary>UniFi Api Key - Network v9.0.0+</summary>
28+
<br>
29+
1. Open your UniFi Console's Network Settings and go to `Settings > Control Plane > Admins & Users`.
30+
31+
2. Selecting your user to operate under. Whenever we modify the DNS Records, this user will show up under `System Log > Admin Activity`
32+
33+
3. Go under `Control Plane API Key` and click `Create New`. You can set the name to whatever you want, and the expiration to whatever you feel like.
34+
35+
4. Create a Kubernetes secret called `external-dns-unifi-secret` that will hold your `UNIFI_API_KEY` with their respected values from Step 3.
36+
37+
```yaml
38+
---
39+
apiVersion: v1
40+
kind: Secret
41+
metadata:
42+
name: external-dns-unifi-secret
43+
data:
44+
api-key: <your-api-key>
45+
```
46+
</details>
47+
48+
<details>
49+
<summary>Username & Password (Deprecated)</summary>
50+
<br>
2451
1. Open your UniFi Console's Network Settings and go to `Settings > Control Plane > Admins & Users`.
2552

26-
2a. If you are running `UniFi Network v9.0.0` or greater, you can create an `Api Key` by selecting your user, going under `Control Plane API Key` and clicking `Create New`. Set the name to whatever you want, and the expiration to whatever you feel like commiting to. You can set `UNIFI_API_KEY` to this key.
53+
2. Select `Create New Admin`.
2754

28-
2b. Otherwise, create a local user with a password in your UniFi OS, this user only needs read/write access to the UniFi Network appliance.
55+
3. In the menu that appears, enable `Restrict to Local Access Only`. Deselect `Use a Predefined Role`. Set `Network: Site Admin`. All other selections can be set to `None`. Click `Create`.
2956

30-
3. Add the ExternalDNS Helm repository to your cluster.
57+
4. Create a Kubernetes secret called `external-dns-unifi-secret` that holds the `username` and `password` with their respected values from Step 3.
58+
59+
```yaml
60+
---
61+
apiVersion: v1
62+
kind: Secret
63+
metadata:
64+
name: external-dns-unifi-secret
65+
data:
66+
username: <your-username>
67+
password: <your-password>
68+
```
69+
</details>
70+
71+
### Installing the provider
72+
73+
1. Add the ExternalDNS Helm repository to your cluster.
3174

3275
```sh
3376
helm repo add external-dns https://kubernetes-sigs.github.io/external-dns/
3477
```
3578

36-
4. Create a Kubernetes secret called `external-dns-unifi-secret` that holds either `api-key` or the `username` and `password` with their respected values from step 2.
79+
2. Deploy your `external-dns-unifi-secret` secret that holds your authentication credentials from either of the
3780

38-
5. Create the helm values file, for example `external-dns-unifi-values.yaml`:
81+
3. Create the helm values file, for example `external-dns-unifi-values.yaml`:
3982

4083
```yaml
4184
fullnameOverride: external-dns-unifi
@@ -51,16 +94,11 @@
5194
value: https://192.168.1.1 # replace with the address to your UniFi router/controller
5295
- name: UNIFI_EXTERNAL_CONTROLLER
5396
value: "false"
54-
- name: UNIFI_USER
55-
valueFrom:
56-
secretKeyRef:
57-
name: external-dns-unifi-secret
58-
key: username
59-
- name: UNIFI_PASS
97+
- name: UNIFI_API_KEY
6098
valueFrom:
6199
secretKeyRef:
62100
name: external-dns-unifi-secret
63-
key: password
101+
key: api-key
64102
- name: LOG_LEVEL
65103
value: *logLevel
66104
livenessProbe:
@@ -84,10 +122,10 @@
84122
domainFilters: ["example.com"] # replace with your domain
85123
```
86124

87-
6. Install the Helm chart
125+
4. Install the Helm chart
88126

89127
```sh
90-
helm install external-dns-unifi external-dns/external-dns -f external-dns-unifi-values.yaml --version 1.14.3 -n external-dns
128+
helm install external-dns-unifi external-dns/external-dns -f external-dns-unifi-values.yaml --version 1.15.0 -n external-dns
91129
```
92130

93131
## Configuration

0 commit comments

Comments
 (0)