Skip to content

plugin/file: trigger reload of zones based on mtime#8085

Merged
yongtang merged 2 commits into
coredns:masterfrom
endreszabo:file_reload_mtime
May 20, 2026
Merged

plugin/file: trigger reload of zones based on mtime#8085
yongtang merged 2 commits into
coredns:masterfrom
endreszabo:file_reload_mtime

Conversation

@endreszabo

Copy link
Copy Markdown
Contributor

1. Why is this pull request needed and what does it do?

In some cases, zone files are generated by CI or similar pipelines and triggers. These zone files are then pushed to multiple nameserver instances working in a multi-master setup. In these cases, generating SOA records and updating the serial numbers is an additional burden.

This PR addresses this issue in these specific use cases by enabling the plugin to reload the zone after the file has been pushed to the nameservers.

I'm proud of how simple it was to implement this, and of the fact that it also performs better, as parsing of the zone file content will only happen if the mtime has advanced. This is an improvement on the classical approach, where the SOA serial number had to be extracted first at each reload interval.

2. Which issues (if any) are related?

Maybe #528 is related to this one.

3. Which documentation changes (if any) need to be made?

Plugin documentation updated.

4. Does this introduce a backward incompatible change or deprecation?

Nope, it's backward compatible.

endreszabo added 2 commits May 4, 2026 12:53
Signed-off-by: Endre Szabo <git@end.re>
Signed-off-by: Endre Szabo <git@end.re>
@endreszabo endreszabo changed the title Zone reload based on mtime. plugin/file: trigger reload of zones based on mtime May 4, 2026
@yongtang yongtang merged commit 35391dd into coredns:master May 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants