mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-15 21:28:28 +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
|
* ## 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
|
* ### 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),
|
* 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()
|
Unmanaged []*UnmanagedConfig `json:"unmanaged,omitempty"` // IGNORE()
|
||||||
UnmanagedUnsafe bool `json:"unmanaged_disable_safety_check,omitempty"` // DISABLE_IGNORE_SAFETY_CHECK
|
UnmanagedUnsafe bool `json:"unmanaged_disable_safety_check,omitempty"` // DISABLE_IGNORE_SAFETY_CHECK
|
||||||
|
|
||||||
IgnoreExternalDNS bool `json:"ignore_external_dns,omitempty"` // IGNORE_EXTERNAL_DNS
|
IgnoreExternalDNS bool `json:"ignore_external_dns,omitempty"` // IGNORE_EXTERNAL_DNS
|
||||||
ExternalDNSPrefix string `json:"external_dns_prefix,omitempty"` // IGNORE_EXTERNAL_DNS prefix
|
ExternalDNSPrefix string `json:"external_dns_prefix,omitempty"` // IGNORE_EXTERNAL_DNS prefix
|
||||||
|
|
||||||
AutoDNSSEC string `json:"auto_dnssec,omitempty"` // "", "on", "off"
|
AutoDNSSEC string `json:"auto_dnssec,omitempty"` // "", "on", "off"
|
||||||
// DNSSEC bool `json:"dnssec,omitempty"`
|
// DNSSEC bool `json:"dnssec,omitempty"`
|
||||||
|
|
|
||||||
|
|
@ -266,8 +266,8 @@ func Test_ignore_external_dns(t *testing.T) {
|
||||||
domain,
|
domain,
|
||||||
existing,
|
existing,
|
||||||
desired,
|
desired,
|
||||||
nil, // absences
|
nil, // absences
|
||||||
nil, // unmanagedConfigs
|
nil, // unmanagedConfigs
|
||||||
false, // unmanagedSafely
|
false, // unmanagedSafely
|
||||||
false, // noPurge
|
false, // noPurge
|
||||||
true, // ignoreExternalDNS
|
true, // ignoreExternalDNS
|
||||||
|
|
@ -352,11 +352,11 @@ func Test_ignore_external_dns_custom_prefix(t *testing.T) {
|
||||||
domain,
|
domain,
|
||||||
existing,
|
existing,
|
||||||
desired,
|
desired,
|
||||||
nil, // absences
|
nil, // absences
|
||||||
nil, // unmanagedConfigs
|
nil, // unmanagedConfigs
|
||||||
false, // unmanagedSafely
|
false, // unmanagedSafely
|
||||||
false, // noPurge
|
false, // noPurge
|
||||||
true, // ignoreExternalDNS
|
true, // ignoreExternalDNS
|
||||||
"extdns-", // externalDNSPrefix
|
"extdns-", // externalDNSPrefix
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,52 @@
|
||||||
{
|
{
|
||||||
"registrars": [],
|
|
||||||
"dns_providers": [],
|
"dns_providers": [],
|
||||||
"domains": [
|
"domains": [
|
||||||
{
|
{
|
||||||
"name": "extdns-default.com",
|
|
||||||
"registrar": "none",
|
|
||||||
"dnsProviders": {},
|
"dnsProviders": {},
|
||||||
|
"ignore_external_dns": true,
|
||||||
"meta": {
|
"meta": {
|
||||||
"dnscontrol_uniquename": "extdns-default.com"
|
"dnscontrol_uniquename": "extdns-default.com"
|
||||||
},
|
},
|
||||||
|
"name": "extdns-default.com",
|
||||||
"records": [],
|
"records": [],
|
||||||
"ignore_external_dns": true
|
"registrar": "none"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "extdns-custom.com",
|
|
||||||
"registrar": "none",
|
|
||||||
"dnsProviders": {},
|
"dnsProviders": {},
|
||||||
|
"external_dns_prefix": "extdns-",
|
||||||
|
"ignore_external_dns": true,
|
||||||
"meta": {
|
"meta": {
|
||||||
"dnscontrol_uniquename": "extdns-custom.com"
|
"dnscontrol_uniquename": "extdns-custom.com"
|
||||||
},
|
},
|
||||||
|
"name": "extdns-custom.com",
|
||||||
"records": [],
|
"records": [],
|
||||||
"ignore_external_dns": true,
|
"registrar": "none"
|
||||||
"external_dns_prefix": "extdns-"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "extdns-combined.com",
|
|
||||||
"registrar": "none",
|
|
||||||
"dnsProviders": {},
|
"dnsProviders": {},
|
||||||
|
"ignore_external_dns": true,
|
||||||
"meta": {
|
"meta": {
|
||||||
"dnscontrol_uniquename": "extdns-combined.com"
|
"dnscontrol_uniquename": "extdns-combined.com"
|
||||||
},
|
},
|
||||||
|
"name": "extdns-combined.com",
|
||||||
"records": [
|
"records": [
|
||||||
{
|
{
|
||||||
"type": "CNAME",
|
|
||||||
"name": "api",
|
|
||||||
"ttl": 300,
|
|
||||||
"filepos": "[line:12:5]",
|
"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]",
|
"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