mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-09 13:46:07 +08:00
wip!
This commit is contained in:
parent
376871961f
commit
24270bf1b8
4 changed files with 36 additions and 29 deletions
7
commands/types/dnscontrol.d.ts
vendored
7
commands/types/dnscontrol.d.ts
vendored
|
|
@ -1773,6 +1773,13 @@ declare function IGNORE(labelSpec: string, typeSpec?: string, targetSpec?: strin
|
|||
*
|
||||
* ## Caveats
|
||||
*
|
||||
* ### One per domain
|
||||
*
|
||||
* Only one `IGNORE_EXTERNAL_DNS()` should be used per domain. If you call it multiple
|
||||
* times, the last prefix wins. If you have multiple external-dns instances with
|
||||
* different prefixes managing the same zone, use `IGNORE()` patterns for additional
|
||||
* prefixes.
|
||||
*
|
||||
* ### TXT Registry Format
|
||||
*
|
||||
* This feature relies on external-dns's [TXT registry](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/registry/txt.md),
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ type DomainConfig struct {
|
|||
Unmanaged []*UnmanagedConfig `json:"unmanaged,omitempty"` // IGNORE()
|
||||
UnmanagedUnsafe bool `json:"unmanaged_disable_safety_check,omitempty"` // DISABLE_IGNORE_SAFETY_CHECK
|
||||
|
||||
IgnoreExternalDNS bool `json:"ignore_external_dns,omitempty"` // IGNORE_EXTERNAL_DNS
|
||||
ExternalDNSPrefix string `json:"external_dns_prefix,omitempty"` // IGNORE_EXTERNAL_DNS prefix
|
||||
IgnoreExternalDNS bool `json:"ignore_external_dns,omitempty"` // IGNORE_EXTERNAL_DNS
|
||||
ExternalDNSPrefix string `json:"external_dns_prefix,omitempty"` // IGNORE_EXTERNAL_DNS prefix
|
||||
|
||||
AutoDNSSEC string `json:"auto_dnssec,omitempty"` // "", "on", "off"
|
||||
// DNSSEC bool `json:"dnssec,omitempty"`
|
||||
|
|
|
|||
|
|
@ -266,8 +266,8 @@ func Test_ignore_external_dns(t *testing.T) {
|
|||
domain,
|
||||
existing,
|
||||
desired,
|
||||
nil, // absences
|
||||
nil, // unmanagedConfigs
|
||||
nil, // absences
|
||||
nil, // unmanagedConfigs
|
||||
false, // unmanagedSafely
|
||||
false, // noPurge
|
||||
true, // ignoreExternalDNS
|
||||
|
|
@ -352,11 +352,11 @@ func Test_ignore_external_dns_custom_prefix(t *testing.T) {
|
|||
domain,
|
||||
existing,
|
||||
desired,
|
||||
nil, // absences
|
||||
nil, // unmanagedConfigs
|
||||
false, // unmanagedSafely
|
||||
false, // noPurge
|
||||
true, // ignoreExternalDNS
|
||||
nil, // absences
|
||||
nil, // unmanagedConfigs
|
||||
false, // unmanagedSafely
|
||||
false, // noPurge
|
||||
true, // ignoreExternalDNS
|
||||
"extdns-", // externalDNSPrefix
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -1,52 +1,52 @@
|
|||
{
|
||||
"registrars": [],
|
||||
"dns_providers": [],
|
||||
"domains": [
|
||||
{
|
||||
"name": "extdns-default.com",
|
||||
"registrar": "none",
|
||||
"dnsProviders": {},
|
||||
"ignore_external_dns": true,
|
||||
"meta": {
|
||||
"dnscontrol_uniquename": "extdns-default.com"
|
||||
},
|
||||
"name": "extdns-default.com",
|
||||
"records": [],
|
||||
"ignore_external_dns": true
|
||||
"registrar": "none"
|
||||
},
|
||||
{
|
||||
"name": "extdns-custom.com",
|
||||
"registrar": "none",
|
||||
"dnsProviders": {},
|
||||
"external_dns_prefix": "extdns-",
|
||||
"ignore_external_dns": true,
|
||||
"meta": {
|
||||
"dnscontrol_uniquename": "extdns-custom.com"
|
||||
},
|
||||
"name": "extdns-custom.com",
|
||||
"records": [],
|
||||
"ignore_external_dns": true,
|
||||
"external_dns_prefix": "extdns-"
|
||||
"registrar": "none"
|
||||
},
|
||||
{
|
||||
"name": "extdns-combined.com",
|
||||
"registrar": "none",
|
||||
"dnsProviders": {},
|
||||
"ignore_external_dns": true,
|
||||
"meta": {
|
||||
"dnscontrol_uniquename": "extdns-combined.com"
|
||||
},
|
||||
"name": "extdns-combined.com",
|
||||
"records": [
|
||||
{
|
||||
"type": "CNAME",
|
||||
"name": "api",
|
||||
"ttl": 300,
|
||||
"filepos": "[line:12:5]",
|
||||
"target": "www.extdns-combined.com."
|
||||
"name": "api",
|
||||
"target": "www.extdns-combined.com.",
|
||||
"ttl": 300,
|
||||
"type": "CNAME"
|
||||
},
|
||||
{
|
||||
"type": "A",
|
||||
"name": "www",
|
||||
"ttl": 300,
|
||||
"filepos": "[line:11:5]",
|
||||
"target": "1.2.3.4"
|
||||
"name": "www",
|
||||
"target": "1.2.3.4",
|
||||
"ttl": 300,
|
||||
"type": "A"
|
||||
}
|
||||
],
|
||||
"ignore_external_dns": true
|
||||
"registrar": "none"
|
||||
}
|
||||
]
|
||||
],
|
||||
"registrars": []
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue