You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Fail closed on zero resolvers in enforce-redirect
Review follow-up: when /etc/resolv.conf yields no nameservers, the prior
code logged a WARNING and proceeded, leaving a running-but-DNS-dead pod
(UDP/53 dropped, TCP/53 captured) that is hard to triage. Exit non-zero
instead so the init container surfaces as Init:Error. In a Kubernetes pod
kubelet always populates resolv.conf, so this only fires on a genuine
misconfiguration; the error message points outside-Kubernetes users at
RESOLV_CONF. The guard runs before any iptables mutation. Adds a
fail-closed test case.
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
0 commit comments