dns: nsupdate host records to the authoritative server #475
Reference in New Issue
Block a user
Delete Branch "benvin/dns-client-nsupdate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the exported-resources → puppet DNS master zone-file flow with per-host RFC2136 dynamic updates against the k8s bind-authoritative write endpoint (198.18.200.9). The master no longer manages zone files.
Design
Each node assembles its DNS records into a local concat file; a systemd
.pathunit watches it and runsdns-update(nsupdate) on change — exactly the watch-a-file model requested.Changes
dns-updatescript +dns-update.service(oneshot) +dns-update.path(watcher). The script sends only the delta since last run and deletes removed records, grouped per zone.zone|name|type|ttl|value) instead of exporting@@concat::fragmentto the master.profiles::dns::updater(all nodes).profiles::dns::updaterserver/key_name/algorithm in common.yaml.Inert until keyed
The updater does nothing until
profiles::dns::updater::key_secret(TSIG) is set in eyaml — records are assembled but not applied, so nodes are safe before the key exists.Prerequisites (k8s side, separate)
bind-authoritativezones must setdynamicUpdate: true+ anupdateKeyRef(a client-update BindTSIGKey) so they accept these updates.Validated
puppet parser/epp validate, puppet-lint, and a functional test of the generated per-zone nsupdate message (replace + delete-removed).
225bdc6020tocf72d0c635cf72d0c635toe359b72037