Skip to content

Commit c7154c9

Browse files
committed
add flag and docs
1 parent 0d56712 commit c7154c9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/registry/txt.md

+18
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
The TXT registry is the default registry.
44
It stores DNS record metadata in TXT records, using the same provider.
55

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: AAAA records always use only the new format regardless of this setting.
14+
15+
Example:
16+
```sh
17+
# Default behavior - creates both formats
18+
external-dns
19+
20+
# Only create new format records
21+
external-dns --txt-new-format-only
22+
```
23+
624
## Prefixes and Suffixes
725

826
In order to avoid having the registry TXT records collide with

pkg/apis/externaldns/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ func (cfg *Config) ParseFlags(args []string) error {
582582
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)
583583
app.Flag("txt-encrypt-enabled", "When using the TXT registry, set if TXT records should be encrypted before stored (default: disabled)").BoolVar(&cfg.TXTEncryptEnabled)
584584
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)
585+
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)").Default(defaultConfig.TXTNewFormatOnly).BoolVar(&cfg.TXTNewFormatOnly)
585586
app.Flag("dynamodb-region", "When using the DynamoDB registry, the AWS region of the DynamoDB table (optional)").Default(cfg.AWSDynamoDBRegion).StringVar(&cfg.AWSDynamoDBRegion)
586587
app.Flag("dynamodb-table", "When using the DynamoDB registry, the name of the DynamoDB table (default: \"external-dns\")").Default(defaultConfig.AWSDynamoDBTable).StringVar(&cfg.AWSDynamoDBTable)
587588

0 commit comments

Comments
 (0)