From 8f56a1a2cac04c7827cf68e5007b6fd23112ed6b Mon Sep 17 00:00:00 2001 From: Sergey Lanzman Date: Thu, 25 Jan 2024 19:34:35 +0200 Subject: [PATCH] enable ipv6 egress on cluster with nodes ipv4 and nodes ipv6 (#2754) --- cmd/aws-vpc-cni/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/aws-vpc-cni/main.go b/cmd/aws-vpc-cni/main.go index 686b2dd3e9..7736be90f0 100644 --- a/cmd/aws-vpc-cni/main.go +++ b/cmd/aws-vpc-cni/main.go @@ -270,8 +270,10 @@ func generateJSON(jsonFile string, outFile string, getPrimaryIP func(ipv4 bool) if egressEnabled { nodeIP, err = getPrimaryIP(false) if err != nil { - log.Errorf("To support IPv6 egress, node primary ENI must have a global IPv6 address, error: %v", err) - return err + // When ENABLE_V6_EGRESS is set, but the node is lacking an IPv6 address, log a warning and disable the egress-v6-cni plugin. + // This allows IPv4-only nodes to function while still alerting the customer to the possibility of a misconfiguration. + log.Warnf("To support IPv6 egress, node primary ENI must have a global IPv6 address, error: %v", err) + egressEnabled = false } } }