You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/flags.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,6 @@
165
165
|`--txt-wildcard-replacement=""`| When using the TXT registry, a custom string that's used instead of an asterisk for TXT records corresponding to wildcard DNS records (optional) |
166
166
|`--[no-]txt-encrypt-enabled`| When using the TXT registry, set if TXT records should be encrypted before stored (default: disabled) |
167
167
|`--txt-encrypt-aes-key=""`| When using the TXT registry, set TXT record decryption and encryption 32 byte aes key (required when --txt-encrypt=true) |
168
-
|`--[no-]txt-new-format-only`| When using the TXT registry, only use new format records which include record type information (e.g., prefix: 'a-'). Reduces number of TXT records (default: disabled) |
169
168
|`--dynamodb-region=""`| When using the DynamoDB registry, the AWS region of the DynamoDB table (optional) |
170
169
|`--dynamodb-table="external-dns"`| When using the DynamoDB registry, the name of the DynamoDB table (default: "external-dns") |
171
170
|`--txt-cache-interval=0s`| The interval between cache synchronizations in duration format (default: disabled) |
Copy file name to clipboardExpand all lines: docs/registry/txt.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,51 @@
3
3
The TXT registry is the default registry.
4
4
It stores DNS record metadata in TXT records, using the same provider.
5
5
6
+
If you plan to manage apex domains with external-dns whilst using a txt registry, you should ensure when using --txt-prefix that you specify the record type substitution and that it ends in a period (**.**). The record should be created under the same domain as the apex record being managed, i.e. --txt-prefix=someprefix-%{record_type}.
7
+
8
+
> Note: `--txt-prefix` and `--txt-suffix` contribute to the 63-byte maximum record length. To avoid errors, use them only if absolutely required and keep them as short as possible.
9
+
6
10
## Record Format Options
7
11
12
+
### For version `v0.18+`
13
+
14
+
The TXT registry supports single format for storing DNS record metadata:
15
+
16
+
- Creates a TXT record with record type information (e.g., 'a-' prefix for A records)
17
+
18
+
The TXT registry would try to guarantee a consistency in between providers and sources, if provider supports the behaviour.
19
+
20
+
If you are dealing with APEX domains, like `example.com` and TXT records are failing to be created for managed record types specified by `--managed-record-types`, consider following options:
21
+
22
+
1. TXT record with prefix based on requirements. Example `--txt-prefix="%{record_type}-abc-"` or `--txt-prefix="%{record_type}.abc-"`
23
+
2. TXT record with suffix based on requirements. Example `--txt-suffix="-abc-%{record_type}"` or `--txt-suffix="-abc.%{record_type}."`
24
+
25
+
If configured `--txt-prefix="%{record_type}-abc-"` for apex domain `ex.com` the expected result is
26
+
27
+
| Name | TYPE |
28
+
|:------------------------------:|:-------:|
29
+
|`cname-a-abc-nginx-v2.ex.com.`|`TXT`|
30
+
|`nginx-v2.ex.com.`|`CNAME`|
31
+
32
+
If configured `--txt-suffix="-abc.%{record_type}"` for apex domain `ex.com` the expected result is
33
+
34
+
| Name | TYPE |
35
+
|:------------------------------:|:-------:|
36
+
|`cname-nginx-v2-abc.a.ex.com.`|`TXT`|
37
+
|`nginx-v3.ex.com.`|`CNAME`|
38
+
39
+
### Manually Cleanup Legacy TXT Records
40
+
41
+
> While deleting registry TXT records won't cause downtime, a well-thought-out migration and cleanup plan is crucial.
42
+
43
+
Occasionally, it may be necessary to remove outdated TXT records from your registry.
44
+
45
+
An example script for AWS can be found in [scripts/aws-cleanup-legacy-txt-records.py](../../scripts/aws-cleanup-legacy-txt-records.py) with instructions on how to run it.
46
+
The script performs targeted deletion of TXT records that include `ResourceRecords` matching the `heritage=external-dns,external-dns/owner=default` or similar pattern.
47
+
In the event of unintended deletion of all TXT records managed by `external-dns`, `external-dns` will initiate a full DNS record regeneration, along with`TXT` and `non-TXT` records. Just be aware, this operation's duration is directly proportional to the DNS estate size."
48
+
49
+
### For version `v0.16.0 & v0.16.1`
50
+
8
51
The TXT registry supports two formats for storing DNS record metadata:
9
52
10
53
- Legacy format: Creates a TXT record without record type information
@@ -31,14 +74,14 @@ The `--txt-new-format-only` flag should be used in addition to your existing ext
31
74
32
75
### Migration to New Format Only
33
76
77
+
> Note: `external-dns` will not automatically remove legacy format records when switching to new-format-only mode. You'll need to clean up the old records manually if desired.
78
+
34
79
When transitioning from dual-format to new-format-only records:
35
80
36
81
- Ensure all your `external-dns` instances support the new format
37
82
- Enable the `--txt-new-format-only` flag on your external-dns instances
38
83
Manually clean up any existing legacy format TXT records from your DNS provider
39
84
40
-
Note: `external-dns` will not automatically remove legacy format records when switching to new-format-only mode. You'll need to clean up the old records manually if desired.
41
-
42
85
## Prefixes and Suffixes
43
86
44
87
In order to avoid having the registry TXT records collide with
app.Flag("txt-wildcard-replacement", "When using the TXT registry, a custom string that's used instead of an asterisk for TXT records corresponding to wildcard DNS records (optional)").Default(defaultConfig.TXTWildcardReplacement).StringVar(&cfg.TXTWildcardReplacement)
626
624
app.Flag("txt-encrypt-enabled", "When using the TXT registry, set if TXT records should be encrypted before stored (default: disabled)").BoolVar(&cfg.TXTEncryptEnabled)
627
625
app.Flag("txt-encrypt-aes-key", "When using the TXT registry, set TXT record decryption and encryption 32 byte aes key (required when --txt-encrypt=true)").Default(defaultConfig.TXTEncryptAESKey).StringVar(&cfg.TXTEncryptAESKey)
628
-
app.Flag("txt-new-format-only", "When using the TXT registry, only use new format records which include record type information (e.g., prefix: 'a-'). Reduces number of TXT records (default: disabled)").BoolVar(&cfg.TXTNewFormatOnly)
629
626
app.Flag("dynamodb-region", "When using the DynamoDB registry, the AWS region of the DynamoDB table (optional)").Default(cfg.AWSDynamoDBRegion).StringVar(&cfg.AWSDynamoDBRegion)
630
627
app.Flag("dynamodb-table", "When using the DynamoDB registry, the name of the DynamoDB table (default: \"external-dns\")").Default(defaultConfig.AWSDynamoDBTable).StringVar(&cfg.AWSDynamoDBTable)
0 commit comments