mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Implement notifies for transfer plugin (#3972)
* Fix notifies in transfer plugin Signed-off-by: Miek Gieben <miek@miek.nl> * Make it compile Signed-off-by: Miek Gieben <miek@miek.nl> * Port more plugins Signed-off-by: Miek Gieben <miek@miek.nl> * golint Signed-off-by: Miek Gieben <miek@miek.nl> * Fix tests Signed-off-by: Miek Gieben <miek@miek.nl> * Fix notifies in transfer plugin Signed-off-by: Miek Gieben <miek@miek.nl> * Make it compile Signed-off-by: Miek Gieben <miek@miek.nl> * Port more plugins Signed-off-by: Miek Gieben <miek@miek.nl> * golint Signed-off-by: Miek Gieben <miek@miek.nl> * Fix tests Signed-off-by: Miek Gieben <miek@miek.nl> * Fix tests Signed-off-by: Miek Gieben <miek@miek.nl> * really fix test Signed-off-by: Miek Gieben <miek@miek.nl> * Implement ixfr fallback and unify file and auto for transfering Signed-off-by: Miek Gieben <miek@miek.nl> * Add transfer tests copied and modified from #3452 Signed-off-by: Miek Gieben <miek@miek.nl> * Test correct selection of plugin Signed-off-by: Miek Gieben <miek@miek.nl> * add upstream back in Signed-off-by: Miek Gieben <miek@miek.nl> * Implement ixfr fallback and unify file and auto for transfering Signed-off-by: Miek Gieben <miek@miek.nl> * fix test Signed-off-by: Miek Gieben <miek@miek.nl> * properly merge Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -16,7 +16,6 @@ zonefile. New or changed zones are automatically picked up from disk.
|
||||
~~~
|
||||
auto [ZONES...] {
|
||||
directory DIR [REGEXP ORIGIN_TEMPLATE]
|
||||
transfer to ADDRESS...
|
||||
reload DURATION
|
||||
}
|
||||
~~~
|
||||
@@ -29,14 +28,12 @@ are used.
|
||||
like `{<number>}` are replaced with the respective matches in the file name, e.g. `{1}` is the
|
||||
first match, `{2}` is the second. The default is: `db\.(.*) {1}` i.e. from a file with the
|
||||
name `db.example.com`, the extracted origin will be `example.com`.
|
||||
* `transfer` enables zone transfers. It may be specified multiples times. `To` or `from` signals
|
||||
the direction. **ADDRESS** must be denoted in CIDR notation (e.g., 127.0.0.1/32) or just as plain
|
||||
addresses. The special wildcard `*` means: the entire internet (only valid for 'transfer to').
|
||||
When an address is specified a notify message will be send whenever the zone is reloaded.
|
||||
* `reload` interval to perform reloads of zones if SOA version changes and zonefiles. It specifies how often CoreDNS should scan the directory to watch for file removal and addition. Default is one minute.
|
||||
Value of `0` means to not scan for changes and reload. eg. `30s` checks zonefile every 30 seconds
|
||||
and reloads zone when serial changes.
|
||||
|
||||
For enabling zone transfers look at the *transfer* plugin.
|
||||
|
||||
All directives from the *file* plugin are supported. Note that *auto* will load all zones found,
|
||||
even though the directive might only receive queries for a specific zone. I.e:
|
||||
|
||||
@@ -59,8 +56,10 @@ notifies to 10.240.1.1
|
||||
org {
|
||||
auto {
|
||||
directory /etc/coredns/zones/org
|
||||
transfer to *
|
||||
transfer to 10.240.1.1
|
||||
}
|
||||
transfer {
|
||||
to *
|
||||
to 10.240.1.1
|
||||
}
|
||||
}
|
||||
~~~
|
||||
@@ -76,3 +75,8 @@ org {
|
||||
}
|
||||
}
|
||||
~~~
|
||||
|
||||
## Also
|
||||
|
||||
Use the *root* plugin to help you specify the location of the zone files. See the *transfer* plugin
|
||||
to enable outgoing zone transfers.
|
||||
|
||||
Reference in New Issue
Block a user