From adcabcdc8cbe56bd565c3dd02a6a814a33b1a6ab Mon Sep 17 00:00:00 2001 From: rejain456 Date: Fri, 10 Jan 2025 14:36:29 -0800 Subject: [PATCH] removed an infra nic check --- cni/network/network.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cni/network/network.go b/cni/network/network.go index ed9ce81a0c..bb87a07177 100644 --- a/cni/network/network.go +++ b/cni/network/network.go @@ -590,11 +590,8 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error { } policies := cni.GetPoliciesFromNwCfg(nwCfg.AdditionalArgs) - for key := range ipamAddResult.interfaceInfo { - if key == string(cns.InfraNIC) { - policies = append(policies, ipamAddResult.interfaceInfo[key].EndpointPolicies...) - } - } + policies = append(policies, ipamAddResult.interfaceInfo[string(cns.InfraNIC)].EndpointPolicies...) + // moved to addIpamInvoker // sendEvent(plugin, fmt.Sprintf("Allocated IPAddress from ipam interface: %+v", ipamAddResult.PrettyString()))