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
feat(txt-registry): add option to use only new format (#4946)
* feat: add option to use only new format TXT records
* add flag and docs
* refine documentation on how to use the flag
* add section regarding manual migration
* update documentation to be same as in types.go
* fix compile issue
* add tests for new flag
* update flags documentation correctly
* add new option to helm chart
* run helm-docs
* remove unessery newline
* add entry to unreleased chart items
* Revert "run helm-docs"
This reverts commit a1d64bd.
* Revert "add new option to helm chart"
This reverts commit 299d087.
* Revert "add entry to unreleased chart items"
This reverts commit 0bcd0e3.
* fix test cases that have changed
Copy file name to clipboardExpand all lines: docs/flags.md
+1
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,7 @@
152
152
|`--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) |
153
153
|`--[no-]txt-encrypt-enabled`| When using the TXT registry, set if TXT records should be encrypted before stored (default: disabled) |
154
154
|`--txt-encrypt-aes-key=""`| When using the TXT registry, set TXT record decryption and encryption 32 byte aes key (required when --txt-encrypt=true) |
155
+
|`--[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) |
155
156
|`--dynamodb-region=""`| When using the DynamoDB registry, the AWS region of the DynamoDB table (optional) |
156
157
|`--dynamodb-table="external-dns"`| When using the DynamoDB registry, the name of the DynamoDB table (default: "external-dns") |
157
158
|`--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
+29
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,35 @@
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
+
## Record Format Options
7
+
The TXT registry supports two formats for storing DNS record metadata:
8
+
- Legacy format: Creates a TXT record without record type information
9
+
- New format: Creates a TXT record with record type information (e.g., 'a-' prefix for A records)
10
+
11
+
By default, the TXT registry creates records in both formats for backwards compatibility. You can configure it to use only the new format by using the `--txt-new-format-only` flag. This reduces the number of TXT records created, which can be helpful when working with provider-specific record limits.
12
+
13
+
Note: The following record types always use only the new format regardless of this setting:
14
+
- AAAA records
15
+
- Encrypted TXT records (when using `--txt-encrypt-enabled`)
The `--txt-new-format-only` flag should be used in addition to your existing external-dns configuration flags. It does not implicitly configure TXT record handling - you still need to specify `--managed-record-types=TXT` if you want external-dns to manage TXT records.
26
+
27
+
### Migration to New Format Only
28
+
When transitioning from dual-format to new-format-only records:
29
+
- Ensure all your `external-dns` instances support the new format
30
+
- Enable the `--txt-new-format-only` flag on your external-dns instances
31
+
Manually clean up any existing legacy format TXT records from your DNS provider
32
+
33
+
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.
34
+
6
35
## Prefixes and Suffixes
7
36
8
37
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)
592
594
app.Flag("txt-encrypt-enabled", "When using the TXT registry, set if TXT records should be encrypted before stored (default: disabled)").BoolVar(&cfg.TXTEncryptEnabled)
593
595
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)
596
+
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)
594
597
app.Flag("dynamodb-region", "When using the DynamoDB registry, the AWS region of the DynamoDB table (optional)").Default(cfg.AWSDynamoDBRegion).StringVar(&cfg.AWSDynamoDBRegion)
595
598
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