Skip to content

Commit e5ebffe

Browse files
committed
Updated the documentation
1 parent b226435 commit e5ebffe

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
> This is a proof of concept. Do not consider it to be free of issues. It works reasonably well for registering names
66
> in your local Kubernetes cluster you use for engineering, such as the one created by [kube-eng](https://github.com/mrmatap/kube-eng).
77
8-
This little Python script watches for Gateways and HTTP Routes part of the [Kubernetes Gateway API](https://gateway-api.sigs.k8s.io)
9-
in the Kubernetes cluster you have configured as your current context. It then works out the hostname from the HTTP route
10-
and registers it in multicast and optionally unicast DNS towards the IP address of the Gateway. cloud-provider-mdns is intended to simplify
11-
local engineering, without the need of running a DNS server or manually hacking your hosts file. Basically run this,
8+
This little Python script watches for Ingresses, Gateways and HTTP Routes in the Kubernetes cluster you have configured as your current context.
9+
. It then works out the fully qualified domain name and external IP address to be registered it in multicast and/or unicast DNS towards the IP. cloud-provider-mdns is intended to simplify
10+
local engineering. If you choose to only use Multicast DNS only then there is no need to run a local DNS server. Basically run this,
1211
watch it find new registrations, then type their names into your browser.
1312

1413
## How to run this
@@ -25,14 +24,29 @@ watch it find new registrations, then type their names into your browser.
2524
$ /path/to/virtualenv/bin/cloud-provider-mdns
2625
```
2726

28-
4. Declare a HTTPRoute with a hostname that ends in '.local'
27+
4. Declare a HTTPRoute with a hostname that ends in '.local' or an Ingress, depending on how your cluster is configured
2928
5. Watch the output of cloud-provider-mdns
3029
6. Type the name into your browser
3130

3231
Registration is done in multicast DNS by default. If you wish to additionally populate a unicast nameserver then
3332
you must specify it's IP, tsig key name and secret using the CLI. A usable example unicast namesever configuration is created
3433
by [kube-eng](https://github.com/mrmatap/kube-eng).
3534
35+
### Configuration
36+
37+
You can configure cloud-provider-mdns by providing a configuration file at `~/etc/cloud-provider-mdns.json` or using
38+
environment variables.
39+
40+
| Field | Environment Variable | Default Value | Description |
41+
|--------------------|--------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
42+
| multicast_enable | CLOUD_PROVIDER_MDNS_MULTICAST_ENABLE | True | Enables registration in multicast DNS **for names that end in `.local`** |
43+
| unicast_enable | CLOUD_PROVIDER_MDNS_UNICAST_ENABLE | False | Enables registration in unicast DNS **for all names that end in the specified domain** |
44+
| unicast_ip | CLOUD_PROVIDER_MDNS_UNICAST_IP | 127.0.0.1 | IP address on which the Unicast DNS server listens on for DDNS updates |
45+
| unicast_domain | CLOUD_PROVIDER_MDNS_UNICAST_DOMAIN | k8s | DNS Domain to update. This the zone name the unicast DNS server is authoritative for. The FQDNs to be registered can be anything, including subdomains of that domain name. |
46+
| unicast_key_name | CLOUD_PROVIDER_MDNS_KEY_NAME | <empty> | Name of the TSIG key authorised to update the unicast_domain |
47+
| unicast_key_secret | CLOUD_PROVIDER_MDNS_KEY_SECRET | <empty> | The TSIG key authorised to update the unicast_domain |
48+
49+
3650
## How to build this
3751
3852
Clone this repository, create a Python virtualenv (you'll need Python >= 3.12), then build and install:

0 commit comments

Comments
 (0)