Merge pull request #6 from contaimlabs/dependabot/go_modules/sigs.k8s.io/external-dns-0.15.1 a1121a06 parents 2042efb4 + 8977f1de

Bump sigs.k8s.io/external-dns from 0.15.0 to 0.15.1

authored by Scott Plunkett committed by GitHub

1
# ExternalDNS - Bunny Webhook Provider
2
3
ExternalDNS is a Kubernetes add-on for automatically managing Domain Name System (DNS) records for
4
Kubernetes services by using different DNS providers. By default, Kubernetes manages DNS records
5
internally, but ExternalDNS takes this functionality a step further by delegating the management of
6
DNS records to an external DNS provider such as this one.
7
8
This repository contains a provider that implements an ExternalDNS webhook provider for [Bunny.net](https://bunny.net).
9
10
## Important
11
12
This provider is not officially supported by [Bunny.net](https://bunny.net), but is maintained by the team at Contaim Labs
13
for the community. If you encounter any issues, please open an issue on this repository. If you have any questions
14
about Bunny.net, please reach out to their support team.
15
16
## Deployment
17
18
You can deploy the provider using any Kubernetes deployment method, such as Helm or kubectl. Examples for the official
19
external-dns Helm chart are provided below.
20
21
### External DNS Helm Chart
22
23
The default configuration is designed to work seamlessly with the official ExternalDNS Helm chart. Be sure to create the
24
`external-dns-bunny-secret` secret with the `api-key` key containing your Bunny.net API key or modify the configuration
25
to use a different secret or method of providing the API key.
26
27
The values file should look similar to the following:
28
29
```yaml
30
namespace: external-dns
31
provider:
32
name: webhook
33
webhook:
34
image:
35
repository: ghcr.io/contaimlabs/external-dns-bunny-webhook
36
tag: v0.3.0
37
env:
38
- name: BUNNY_API_KEY
39
valueFrom:
40
secretKeyRef:
41
name: external-dns-bunny-secret
42
key: api-key
43
```
44
45
To deploy the provider using the Helm chart, add the repository. You can skip this step if you already have the
46
repository added.
47
48
```shell
49
helm repo add external-dns https://kubernetes-sigs.github.io/external-dns/
50
```
51
52
Once the repository is added, install the chart with the values file.
53
54
```shell
55
helm upgrade --install external-dns external-dns/external-dns --version 1.15.0
56
```
57
58
Additional configuration options are available below and may be set using environment variables.
59
60
## Configuration
61
62
The provider can be configured using the following environment variables:
63
64
| Environment Variable | Required | Description | Default |
65
|----------------------|----------|-------------|---------|
66
| `BUNNY_API_KEY` | Yes | The API key used to authenticate with the Bunny.net API. | |
67
| `BUNNY_DRY_RUN` | No | If set to `true`, the provider will not make any changes to the DNS records. | `false` |
68
| `WEBHOOK_HOST` | No | The host to use for the webhook endpoint. | `localhost` |
69
| `WEBHOOK_PORT` | No | The port to use for the webhook endpoint. | `8888` |
70
| `WEBHOOK_READ_TIMEOUT` | No | The read timeout for the webhook endpoint. | `60s` |
71
| `WEBHOOK_WRITE_TIMEOUT` | No | The write timeout for the webhook endpoint. | `60s` |
72
| `HEALTH_HOST` | No | The host to use for the health endpoint. | `0.0.0.0` |
73
| `HEALTH_PORT` | No | The port to use for the health endpoint. | `8080` |
74
| `HEALTH_READ_TIMEOUT` | No | The read timeout for the health endpoint. | `60s` |
75
| `HEALTH_WRITE_TIMEOUT` | No | The write timeout for the health endpoint. | `60s` |
76
77
## Provider-Specific Annotations
78
79
The following annotations may be added to sources to control behavior of the DNS records created by this provider:
80
81
### `external-dns.alpha.kubernetes.io/webhook-bunny-disabled`
82
83
If set to `true`, the DNS record will be managed but set to disabled in the Bunny API. This annotation is optional
84
and will default to `false` if not provided. Disabling a record will cause it to not respond to DNS queries,
85
but will still be managed by the provider and visible in the Bunny.net dashboard.
86
87
### `external-dns.alpha.kubernetes.io/webhook-bunny-monitor-type`
88
89
The monitor type to use for the DNS record. Valid values are `none` (default), `http`, and `ping`. This
90
annotation is optional and will default to `none` if not provided, which will create a standard DNS record
91
without any monitoring.
92
93
### `external-dns.alpha.kubernetes.io/webhook-bunny-weight`
94
95
The weight to use for the DNS record. Valid values are between 1 and 100. This annotation is optional and will
96
default to `100` if not provided. Any value outside of the valid range will be set to the nearest valid value,
97
and any non-integer value will result in the default value being used.
98
99
### Additional Annotations
100
101
The following additional annotations are being considered for future releases:
102
103
#### Smart DNS Records
104
105
Smart DNS records are a feature of Bunny.net that allow you to create DNS records that route traffic based on
106
latency or geographic location. These annotations are not yet implemented, but are planned for a future release.
107
We would like to hear from you if you are interested in this feature.
108
109
##### `external-dns.alpha.kubernetes.io/webhook-bunny-smart-type`
110
111
The type of smart DNS record to create. Valid values are `none`, `latency`, and `geo`. This annotation is optional
112
and will default to `none` if not provided.
113
114
##### `external-dns.alpha.kubernetes.io/webhook-bunny-smart-latency-zone`
115
116
The latency zone to use for the smart DNS record. This annotation is required if the `smart-type` is set to `latency`
117
and must be a valid Bunny.net latency zone.
118
119
##### `external-dns.alpha.kubernetes.io/webhook-bunny-smart-geo-lat`
120
121
The latitude to use for the smart DNS record. This annotation is required if the `smart-type` is set to `geo` and
122
must be a valid latitude value.
123
124
##### `external-dns.alpha.kubernetes.io/webhook-bunny-smart-geo-long`
125
126
The longitude to use for the smart DNS record. This annotation is required if the `smart-type` is set to `geo` and
127
must be a valid longitude value.
128
129
##### `external-dns.alpha.kubernetes.io/webhook-bunny-smart-geo-preset`
130
131
A list of preset lat/lng for common Cloud Providers and their regions will be maintained in the future. This annotation
132
will allow you to specify a preset to use for the smart DNS record. This annotation will be optional and will be mutually
133
exclusive with the `geo-lat` and `geo-long` annotations.
134
135
An example for this annotation might be:
136
137
```yaml
138
annotations:
139
external-dns.alpha.kubernetes.io/webhook-bunny-smart-type: "geo"
140
external-dns.alpha.kubernetes.io/webhook-bunny-smart-geo-preset: "aws:us-east-1"
141
```
142
143
## Development
144
145
A development environment can be set up using [Tilt](https://tilt.dev) by running the following command:
146
147
```shell
148
tilt up
149
```
150
151
This will start the development environment and open a browser window with the Tilt dashboard. The provider will
152
automatically reload when changes are made to the source code.
153
154
## License
155
156
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
157