From f2170bc6c3d85e5fba50c75cac23aa79c1cbe827 Mon Sep 17 00:00:00 2001 From: Predrag Rogic Date: Mon, 25 Aug 2025 22:40:52 +0100 Subject: [PATCH] kube-proxy: log but don't exit if ipv4 or ipv6 is not available --- cmd/kube-proxy/app/server_linux.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/kube-proxy/app/server_linux.go b/cmd/kube-proxy/app/server_linux.go index 37c4da7bbbc..d355d23746e 100644 --- a/cmd/kube-proxy/app/server_linux.go +++ b/cmd/kube-proxy/app/server_linux.go @@ -90,18 +90,17 @@ func (s *ProxyServer) platformCheckSupported(ctx context.Context) (ipv4Supported if isIPTablesBased(s.Config.Mode) { // Check for the iptables and ip6tables binaries. - var ipts map[v1.IPFamily]utiliptables.Interface - ipts, err = utiliptables.NewDualStack() + ipts, errDS := utiliptables.NewDualStack() ipv4Supported = ipts[v1.IPv4Protocol] != nil ipv6Supported = ipts[v1.IPv6Protocol] != nil if !ipv4Supported && !ipv6Supported { - err = fmt.Errorf("iptables is not available on this host : %w", err) + err = fmt.Errorf("iptables is not available on this host : %w", errDS) } else if !ipv4Supported { - logger.Info("No iptables support for family", "ipFamily", v1.IPv4Protocol, "error", err) + logger.Info("No iptables support for family", "ipFamily", v1.IPv4Protocol, "error", errDS) } else if !ipv6Supported { - logger.Info("No iptables support for family", "ipFamily", v1.IPv6Protocol, "error", err) + logger.Info("No iptables support for family", "ipFamily", v1.IPv6Protocol, "error", errDS) } } else { // The nft CLI always supports both families.