# ExternalDNS

## Overview

The source code and default configuration of the Building Block is available in our [code.syseleven.de](<https://code.syseleven.de/syseleven/building-blocks/helmfiles/external-dns>). For information on release notes and new features please follow the link: [Release notes external-dns](<https://code.syseleven.de/syseleven/building-blocks/helmfiles/external-dns/-/blob/main/RELEASE-NOTES.md>).

### External-DNS

To expose your Kubernetes services discoverable, you can deploy the External-DNS Building block which is an add-on to Kubernetes. See [the GitHub issue](<https://github.com/kubernetes-sigs/external-dns/issues/1837>) for more information if you like to use your own DNS solution or an established deployment (as one of the Provider mentioned in the github.com link) there is no restrictions to do so. Please refer to the appropriate documentation from your provider.

### Prerequisites On External-DNS

Proceed with the following prerequisite description to use the Building Block out of the box.

#### Recommended Setup

A recommended resource overview is listed in the table below.

| CPU / vCPU | Memory |
| --- | --- |
| 0.1 | 128MiB |

No further activities need to be carried out in advance.

### Adding The Building Block

Add the directory `syseleven-external-dns` to your control repository. Add a `.gitlab-ci.yml` to the directory with the following content:

```yaml
include:
  - project: syseleven/building-blocks/helmfiles/external-dns
    file: JobDevelopment.yaml
    ref: { { site.building_blocks.external_dns.version|e } }
  - project: syseleven/building-blocks/helmfiles/external-dns
    file: JobStaging.yaml
    ref: { { site.building_blocks.external_dns.version|e } }
  - project: syseleven/building-blocks/helmfiles/external-dns
    file: JobProduction.yaml
    ref: { { site.building_blocks.external_dns.version|e } }
```

Remove environments you are not using by removing their include.

### Known Issues

- When using [designate as DNS provider](<https://docs.openstack.org/designate/latest/>), for example with [DNSaaS](<https://documentation.syseleven.de/en/prior-docs/openstack-cloud/how-to/dnsaas/index.md>), cert-manager will not correctly sync records when there is a `external-dns.alpha.kubernetes.io/ttl` annotation. The record will get created in one run and be deleted in the next run.

### Required Configuration

No configuration is required.

### Monitoring

#### Additional Alert-Rules

- None

#### Additional Grafana dashboards

- None

### Scaling Setup

No scaling needed:

- Usually it is not needed to scale replicas unless you have an excessive amount of ingress/service creation requests
- Requests/limits for CPU/memory can be adjusted

#### Release-Notes

Please find more information on release notes and new features [Release notes External-DNS](<https://code.syseleven.de/syseleven/building-blocks/helmfiles/external-dns/-/blob/main/RELEASE-NOTES.md>)
