Files
bind-operator/internal/bind/consts.go
T
unkin-agent 70e5b0ed55
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
apply config changes via rndc reconfig instead of restarting pods
- symlink named.conf to the projected file so kubelet updates reach named
- drop the config hash from the pod template; hash only the entrypoint
- reconfig each pod once its mounted config matches, tracked in status
- surface reconfig failures with checkconf detail on ConfigApplied
2026-10-16 23:30:51 +11:00

40 lines
1.4 KiB
Go

package bind
// Filesystem layout and binary locations inside a BIND pod. The operator mounts
// its rendered config at ConfigDir (a path distinct from the image's own
// /etc/bind, so the base image's bind.keys trust anchors remain available for
// dnssec-validation).
const (
// ContainerName is the BIND container name within each pod.
ContainerName = "bind"
// ConfigDir is where the operator projects named.conf, keys and the
// entrypoint. Kept separate from the image's /etc/bind.
ConfigDir = "/etc/bind-operator"
// DataDir is BIND's writable working directory (backed by the PVC): zone
// databases and journals.
DataDir = "/var/lib/named"
// RunDir holds the ordinal-selected named.conf (writable emptyDir).
RunDir = "/run/named"
// Binary locations in the ISC BIND9 image (Debian/Ubuntu layout).
NamedBin = "/usr/sbin/named"
RndcBin = "/usr/sbin/rndc"
NsupdateBin = "/usr/bin/nsupdate"
DigBin = "/usr/bin/dig"
CheckconfBin = "/usr/bin/named-checkconf"
)
// Config file paths derived from ConfigDir.
const (
NamedConfRun = RunDir + "/named.conf"
NamedConfPrimary = ConfigDir + "/named.conf.primary"
NamedConfSecondary = ConfigDir + "/named.conf.secondary"
EntrypointPath = ConfigDir + "/entrypoint.sh"
KeysConfPath = ConfigDir + "/keys.conf"
RndcKeyPath = ConfigDir + "/rndc.key"
RndcConfPath = ConfigDir + "/rndc.conf"
)