mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 18:23:25 -05:00
Fully deprecate TIMEOUT and NO_RELOAD (#2742)
* Fully deprecate NO_RELOAD Signed-off-by: Xiao An <hac@zju.edu.cn> * Fully deprecate TIMEOUT Signed-off-by: Xiao An <hac@zju.edu.cn> * Update CI tests to adapt to the deprecation of TIMEOUT Signed-off-by: Xiao An <hac@zju.edu.cn> * Add documents for directive transfer in plugin auto Signed-off-by: Xiao An <hac@zju.edu.cn>
This commit is contained in:
@@ -28,7 +28,6 @@ If you want to round-robin A and AAAA responses look at the *loadbalance* plugin
|
||||
file DBFILE [ZONES... ] {
|
||||
transfer to ADDRESS...
|
||||
reload DURATION
|
||||
no_reload
|
||||
upstream
|
||||
}
|
||||
~~~
|
||||
@@ -40,7 +39,6 @@ file DBFILE [ZONES... ] {
|
||||
* `reload` interval to perform a reload of the zone if the SOA version changes. Default is one minute.
|
||||
Value of `0` means to not scan for changes and reload. For example, `30s` checks the zonefile every 30 seconds
|
||||
and reloads the zone when serial changes.
|
||||
* `no_reload` deprecated. Sets reload to 0.
|
||||
* `upstream` resolve external names found (think CNAMEs) pointing to external names. This is only
|
||||
really useful when CoreDNS is configured as a proxy; for normal authoritative serving you don't
|
||||
need *or* want to use this. CoreDNS will resolve CNAMEs against itself.
|
||||
|
||||
@@ -112,10 +112,6 @@ func fileParse(c *caddy.Controller) (Zones, error) {
|
||||
}
|
||||
reload = d
|
||||
|
||||
case "no_reload":
|
||||
log.Warning("NO_RELOAD of directory is deprecated. Use RELOAD (set to 0) instead. See https://coredns.io/plugins/file/#syntax")
|
||||
reload = 0
|
||||
|
||||
case "upstream":
|
||||
// ignore args, will be error later.
|
||||
c.RemainingArgs() // clear buffer
|
||||
|
||||
@@ -26,18 +26,6 @@ func TestFileParse(t *testing.T) {
|
||||
shouldErr bool
|
||||
expectedZones Zones
|
||||
}{
|
||||
{
|
||||
`file ` + zoneFileName1 + ` miek.nl {
|
||||
transfer from 127.0.0.1
|
||||
}`,
|
||||
true,
|
||||
Zones{},
|
||||
},
|
||||
{
|
||||
`file`,
|
||||
true,
|
||||
Zones{},
|
||||
},
|
||||
{
|
||||
`file ` + zoneFileName1 + ` miek.nl.`,
|
||||
false,
|
||||
@@ -60,12 +48,32 @@ func TestFileParse(t *testing.T) {
|
||||
false, // OK for now as we disregard any options for the `upstream`.
|
||||
Zones{Names: []string{"example.net."}},
|
||||
},
|
||||
// errors.
|
||||
{
|
||||
`file ` + zoneFileName1 + ` miek.nl {
|
||||
transfer from 127.0.0.1
|
||||
}`,
|
||||
true,
|
||||
Zones{},
|
||||
},
|
||||
{
|
||||
`file`,
|
||||
true,
|
||||
Zones{},
|
||||
},
|
||||
{
|
||||
`file ` + zoneFileName1 + ` example.net. {
|
||||
no_reload
|
||||
}`,
|
||||
true,
|
||||
Zones{},
|
||||
},
|
||||
{
|
||||
`file ` + zoneFileName1 + ` example.net. {
|
||||
no_rebloat
|
||||
}`,
|
||||
true,
|
||||
Zones{Names: []string{}},
|
||||
Zones{},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user