fix: use configured domain in CoreDNS Corefile generation
Two bugs caused DNS to fail when the domain name changes: 1. generate_corefile() hardcoded 'cell' as the zone name instead of using the configured domain — on startup it would silently reset any domain change back to 'cell' 2. apply_domain() regex replaced ALL non-dot zones (including local.cell) with the new domain → duplicate zone blocks → CoreDNS crash Fix: add a domain parameter to generate_corefile/apply_all_dns_rules, add _configured_domain() helper in app.py, and delegate Corefile updates in apply_domain() to generate_corefile() so the logic is in one place. Also parameterise SERVICE_HOSTS ACL entries via the domain argument. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -5,12 +5,12 @@
|
||||
health
|
||||
}
|
||||
|
||||
cell {
|
||||
file /data/cell.zone
|
||||
dev {
|
||||
file /data/dev.zone
|
||||
log
|
||||
}
|
||||
|
||||
local.cell {
|
||||
local.dev {
|
||||
file /data/local.zone
|
||||
log
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user