Move kea entrypoints out of Go fmt.Sprintf into an initContainer #6
Reference in New Issue
Block a user
Delete Branch "benvin/entrypoint-refactor"
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?
Why
Container entrypoints were rendered as
fmt.Sprintfshell strings in Go. Every entrypoint fix needed a full operator release, nothing was shellcheckable, and the escaping was a standing hazard. This is a behaviour-preserving cleanup for v0.1.4.How
kea-initinitContainer that finalises the per-pod config and bounded-waits for HA peer DNS, replacing the in-entrypoint retry. It hardens the shared run dir to0750, substitutesthis-server-namefrom the pod ordinal (POD_NAMEvia the downward API), stages both configs into the shared emptyDir, and gates onkea-dhcp4 -t(60x2s) — failing loud after the cap so the kubelet restarts it instead of starting a doomed server.kea-dhcp4/kea-ctrl-agentcontainers with kea exec'd directly, dropping both wrapper shells.fmt.Sprintfentrypoints with a single committedinternal/kea/scripts/init.shembedded viago:embedand parameterised entirely by env vars — no Go string interpolation.Test
kea-initinitContainer,POD_NAMEfrom the downward API, main containers exec kea directly, and the ConfigMap carriesinit.sh(not the old per-container entrypoints).init.shhardens the socket dir, gates onkea-dhcp4 -t, fails loud after the cap, and is free of fmt verbs.