|
1 | 1 | # ExternalDNS - OpenStack Designate Webhook
|
2 | 2 |
|
3 | 3 | This is an [ExternalDNS provider](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/webhook-provider.md) for [OpenStack's Designate DNS server](https://docs.openstack.org/designate/latest/).
|
4 |
| -This projects externalizes the yet in-tree [OpenStack Designate provider](https://github.com/kubernetes-sigs/external-dns/tree/master/provider/designate). |
| 4 | +This projects externalizes the in-tree [OpenStack Designate provider](https://github.com/kubernetes-sigs/external-dns/tree/master/provider/designate) and offers a way forward for bugfixes and new features as the in-tree providers have been [deprecated](https://github.com/kubernetes-sigs/external-dns?tab=readme-ov-file#status-of-in-tree-providers) and thus the code for OpenStack Designate will never leave the `Alpha` state. |
5 | 5 |
|
6 |
| -### 🌪 This project is in a very early stage and likely does not do what you expect! |
| 6 | +## Installation |
| 7 | + |
| 8 | +This webhook provider is run easiest as sidecar within the `external-dns` pod. This can be achieved using the official |
| 9 | +`external-dns` Helm chart and [its support for the `webhook` provider type]([https://kubernetes-sigs.github.io/external-dns/latest/charts/external-dns/#providers]). |
| 10 | + |
| 11 | +Setting the `provider.name` to `webhook` allows configuration of the |
| 12 | +`external-dns-openstack-webhook` via a few additional values: |
| 13 | + |
| 14 | +```yaml |
| 15 | +provider: |
| 16 | + name: webhook |
| 17 | + webhook: |
| 18 | + image: |
| 19 | + repository: ghcr.io/inovex/external-dns-openstack-webhook |
| 20 | + tag: 1.0.0 |
| 21 | + extraVolumeMounts: |
| 22 | + - name: oscloudsyaml |
| 23 | + mountPath: /etc/openstack/ |
| 24 | + resources: {} |
| 25 | + securityContext: |
| 26 | + runAsUser: 1000 |
| 27 | +``` |
| 28 | +
|
| 29 | +The referenced `extraVolumeMount` points to a `Secret` containing the `clouds.yaml` file, which provides the OpenStack Keystone credentials to the webhook provider. While it seems cumbersome to require a file instead of the commonly used `OS_*` environment variables, the use of a `clouds.yaml` file offers more structure, capabilities and allows for better validation. |
| 30 | + |
| 31 | +The following example is a basic example of such a file, using `openstack` as the cloud name (which is the default used by this webhook): |
| 32 | + |
| 33 | +```yaml |
| 34 | +clouds: |
| 35 | + openstack: |
| 36 | + auth: |
| 37 | + auth_url: https://auth.cloud.example.com |
| 38 | + application_credential_id: "TOP" |
| 39 | + application_credential_secret: "SECRET" |
| 40 | + region_name: "earth" |
| 41 | + interface: "public" |
| 42 | + auth_type: "v3applicationcredential" |
| 43 | +``` |
| 44 | + |
| 45 | +An existing file can be converted into a Secret via kubectl: |
| 46 | + |
| 47 | +```shell |
| 48 | +kubectl create secret generic oscloudsyaml --namespace external-dns --from-file=clouds.yaml |
| 49 | +``` |
| 50 | + |
| 51 | +and then also be added an extraVolume to within the `values.yaml` of external-dns: |
| 52 | + |
| 53 | +```yaml |
| 54 | +extraVolumes: |
| 55 | + - name: oscloudsyaml |
| 56 | + secret: |
| 57 | + secretName: oscloudsyaml |
| 58 | +``` |
| 59 | + |
| 60 | +## Bugs or feature requests |
| 61 | + |
| 62 | +This webhook certainly still contains bugs or lacks certain features. |
| 63 | +In such cases, please raise a GitHub issue with as much detail as possible. PRs with fixes and features are also very welcome. |
7 | 64 |
|
8 | 65 | ## Development
|
9 | 66 |
|
10 |
| -To run the webhook locally, you'll need to create a [clouds.yaml](https://docs.openstack.org/python-openstackclient/pike/configuration/index.html#clouds-yaml) |
11 |
| -file and put it in one of the standard-locations. |
12 |
| -Then set the cloud to be used in the `OS_CLOUD` environemnt variable. |
| 67 | +To run the webhook locally, you'll also require a [clouds.yaml](https://docs.openstack.org/python-openstackclient/pike/configuration/index.html#clouds-yaml) file in one of the standard-locations. Also the name of the entry to be used has be given via `OS_CLOUD` environment variable. |
13 | 68 | You can then start the webhook server using:
|
14 | 69 |
|
15 | 70 | ```sh
|
|
0 commit comments