Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ClearEntriesWithIP (0.09 sec)

  1. cni/pkg/nodeagent/server_test.go

    	fakeIPSetDeps := ipset.FakeNLDeps()
    	set := ipset.IPSet{V4Name: "foo-v4", Prefix: "foo", Deps: fakeIPSetDeps}
    
    	fakeIPSetDeps.On("clearEntriesWithIP",
    		"foo-v4",
    		netip.MustParseAddr("3.3.3.3"),
    	).Return(nil)
    
    	fakeIPSetDeps.On("clearEntriesWithIP",
    		"foo-v4",
    		netip.MustParseAddr("2.2.2.2"),
    	).Return(nil)
    
    	err := removePodFromHostNSIpset(pod, &set)
    	assert.NoError(t, err)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Oct 09 16:05:45 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/server.go

    }
    
    func removePodFromHostNSIpset(pod *corev1.Pod, hostsideProbeSet *ipset.IPSet) error {
    	podIPs := util.GetPodIPsIfPresent(pod)
    	for _, pip := range podIPs {
    		if err := hostsideProbeSet.ClearEntriesWithIP(pip); err != nil {
    			return err
    		}
    		log.Debugf("removed pod name %s with UID %s from host ipset %s by ip %s", pod.Name, pod.UID, hostsideProbeSet.Prefix, pip)
    	}
    
    	return nil
    }
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Sep 25 20:54:34 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. cni/pkg/ipset/nldeps_linux.go

    			err := netlink.IpsetDel(name, &entry)
    			if err != nil {
    				return fmt.Errorf("failed to delete IP %s from ipset %s: %w", entry.IP, name, err)
    			}
    		}
    	}
    	return nil
    }
    
    func (m *realDeps) clearEntriesWithIP(name string, ip netip.Addr) error {
    	delIP := net.IP(ip.AsSlice())
    	res, err := netlink.IpsetList(name)
    	if err != nil {
    		return fmt.Errorf("failed to list ipset %s: %w", name, err)
    	}
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Jul 18 23:53:18 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top