1b8be63d05
Kea 2.6.5 restricts control/HA unix socket paths to its compiled
runstatedir and rejects any other path by exact string match
("invalid path specified: '/run/kea', supported path is '/var/run/kea'"),
even though /var/run is a symlink to /run. The operator rendered sockets
under /run/kea, so kea-dhcp4 and kea-ctrl-agent crash-looped on startup.
- Point RunDir at /var/run/kea so all derived config/socket paths match.
- Pre-create /var/run/kea in the kea image.
- Assert rendered socket paths live under /var/run/kea.
Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
51 lines
1.9 KiB
Go
51 lines
1.9 KiB
Go
package kea
|
|
|
|
// Filesystem and binary paths inside the kea container image, plus the
|
|
// operator's label/annotation vocabulary.
|
|
const (
|
|
// ContainerDHCP4 is the kea-dhcp4 container name.
|
|
ContainerDHCP4 = "kea-dhcp4"
|
|
// ContainerCtrlAgent is the kea-ctrl-agent container name.
|
|
ContainerCtrlAgent = "kea-ctrl-agent"
|
|
|
|
// ConfigDir is where projected config is mounted read-only.
|
|
ConfigDir = "/etc/kea-operator"
|
|
// RunDir is a shared emptyDir for the config copy and control socket. Kea
|
|
// 2.6+ restricts unix socket paths to its compiled runstatedir and rejects
|
|
// anything else by exact string ("supported path is '/var/run/kea'"), even
|
|
// though /var/run symlinks to /run, so this must be the literal /var/run/kea.
|
|
RunDir = "/var/run/kea"
|
|
|
|
// DHCP4ConfPath is the runtime kea-dhcp4 config.
|
|
DHCP4ConfPath = RunDir + "/kea-dhcp4.conf"
|
|
// CtrlAgentConfPath is the runtime kea-ctrl-agent config.
|
|
CtrlAgentConfPath = RunDir + "/kea-ctrl-agent.conf"
|
|
// CtrlSocketPath is the unix control socket between ctrl-agent and dhcp4.
|
|
CtrlSocketPath = RunDir + "/kea4-ctrl-socket"
|
|
// EntrypointPath is the generated container entrypoint.
|
|
EntrypointPath = ConfigDir + "/entrypoint.sh"
|
|
|
|
// DHCP4Bin is the kea-dhcp4 server binary.
|
|
DHCP4Bin = "/usr/sbin/kea-dhcp4"
|
|
// CtrlAgentBin is the kea-ctrl-agent binary.
|
|
CtrlAgentBin = "/usr/sbin/kea-ctrl-agent"
|
|
|
|
// HooksDir holds the Kea hook libraries.
|
|
HooksDir = "/usr/lib64/kea/hooks"
|
|
// HALibrary is the High Availability hook.
|
|
HALibrary = HooksDir + "/libdhcp_ha.so"
|
|
// LeaseCmdsLibrary is the lease commands hook (required by HA lease sync).
|
|
LeaseCmdsLibrary = HooksDir + "/libdhcp_lease_cmds.so"
|
|
|
|
// CtrlAgentPort is the REST control channel port.
|
|
CtrlAgentPort = 8000
|
|
// DHCP4Port is the DHCPv4 server port.
|
|
DHCP4Port = 67
|
|
|
|
// DefaultImage is the kea workload image built by this repo.
|
|
DefaultImage = "git.unkin.net/unkin/kea:latest"
|
|
|
|
// ClientArchOption is the DHCP option code carrying PXE client arch.
|
|
ClientArchOption = 93
|
|
)
|