Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 92 for netutils (0.12 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/net/interface_test.go

    	upIntf       = makeIntf(1, "eth3", flagUp)
    )
    
    var (
    	ipv4Route = Route{Interface: "eth3", Destination: netutils.ParseIPSloppy("0.0.0.0"), Gateway: netutils.ParseIPSloppy("10.254.0.1"), Family: familyIPv4}
    	ipv6Route = Route{Interface: "eth3", Destination: netutils.ParseIPSloppy("::"), Gateway: netutils.ParseIPSloppy("2001:1::1"), Family: familyIPv6}
    )
    
    var (
    	noRoutes   = []Route{}
    	routeV4    = []Route{ipv4Route}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 07:29:34 UTC 2023
    - 33.2K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/cidrallocator.go

    	address, _ := netip.AddrFromSlice(bytes)
    	return address
    }
    
    // Convert netutils.IPFamily to v1.IPFamily
    // TODO: consolidate helpers
    // copied from pkg/proxy/util/utils.go
    func convertToV1IPFamily(ipFamily netutils.IPFamily) v1.IPFamily {
    	switch ipFamily {
    	case netutils.IPv4:
    		return v1.IPv4Protocol
    	case netutils.IPv6:
    		return v1.IPv6Protocol
    	}
    
    	return v1.IPFamilyUnknown
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  3. pkg/registry/core/service/ipallocator/bitmap.go

    func New(cidr *net.IPNet, allocatorFactory allocator.AllocatorWithOffsetFactory) (*Range, error) {
    	max := netutils.RangeSize(cidr)
    	base := netutils.BigForIP(cidr.IP)
    	rangeSpec := cidr.String()
    	var family api.IPFamily
    
    	if netutils.IsIPv6CIDR(cidr) {
    		family = api.IPv6Protocol
    		// Limit the max size, since the allocator keeps a bitmap of that size.
    		if max > 65536 {
    			max = 65536
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 10.8K bytes
    - Viewed (0)
  4. pkg/controller/nodeipam/ipam/cidrset/cidr_set_test.go

    	// operations have been executed.
    	numAllocatable24s := (1 << 8) - 3
    
    	_, clusterCIDR, _ := netutils.ParseCIDRSloppy(clusterCIDRStr)
    	a, err := NewCIDRSet(clusterCIDR, 24)
    	if err != nil {
    		t.Fatalf("Error allocating CIDRSet")
    	}
    
    	// Execute the operations
    	for _, op := range operations {
    		_, cidr, _ := netutils.ParseCIDRSloppy(op.cidrStr)
    		switch op.operation {
    		case "occupy":
    			a.Occupy(cidr)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 11 08:53:03 UTC 2023
    - 29.5K bytes
    - Viewed (0)
  5. cmd/kube-proxy/app/server_test.go

    			rawNodeIPs: []net.IP{
    				netutils.ParseIPSloppy("90.90.90.90"),
    				netutils.ParseIPSloppy("2001:db8::2"),
    			},
    			bindAddress:    "::",
    			expectedFamily: v1.IPv4Protocol,
    			expectedIPv4:   "90.90.90.90",
    			expectedIPv6:   "2001:db8::2",
    		},
    		{
    			name: "Dual stack, primary IPv6",
    			rawNodeIPs: []net.IP{
    				netutils.ParseIPSloppy("2001:db8::2"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  6. pkg/proxy/winkernel/proxier_test.go

    	"k8s.io/apimachinery/pkg/types"
    	"k8s.io/apimachinery/pkg/util/intstr"
    	"k8s.io/kubernetes/pkg/proxy"
    	"k8s.io/kubernetes/pkg/proxy/healthcheck"
    	fakehcn "k8s.io/kubernetes/pkg/proxy/winkernel/testing"
    	netutils "k8s.io/utils/net"
    	"k8s.io/utils/ptr"
    )
    
    const (
    	testHostName      = "test-hostname"
    	testNetwork       = "TestNetwork"
    	ipAddress         = "10.0.0.1"
    	prefixLen         = 24
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 28 14:30:51 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  7. pkg/kubelet/certificate/kubelet.go

    			continue
    		}
    
    		switch address.Type {
    		case v1.NodeHostName:
    			if ip := netutils.ParseIPSloppy(address.Address); ip != nil {
    				seenIPs[address.Address] = true
    			} else {
    				seenDNSNames[address.Address] = true
    			}
    		case v1.NodeExternalIP, v1.NodeInternalIP:
    			if ip := netutils.ParseIPSloppy(address.Address); ip != nil {
    				seenIPs[address.Address] = true
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 03:07:16 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. pkg/proxy/iptables/number_generated_rules_test.go

    	endpointSlices := make([]*discovery.EndpointSlice, nServices)
    
    	// base parameters
    	basePort := 80
    	base := netutils.BigForIP(netutils.ParseIPSloppy("10.0.0.1"))
    
    	// generate a base endpoint slice object
    	baseEp := netutils.BigForIP(netutils.ParseIPSloppy("172.16.0.1"))
    	epPort := 8080
    
    	eps := &discovery.EndpointSlice{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "ep",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 14:39:54 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  9. pkg/proxy/apis/config/validation/validation.go

    		case len(cidrs) == 2:
    			isDual, err := netutils.IsDualStackCIDRStrings(cidrs)
    			if err != nil || !isDual {
    				allErrs = append(allErrs, field.Invalid(newPath.Child("ClusterCIDR"), config.ClusterCIDR, "must be a valid DualStack CIDR (e.g. 10.100.0.0/16,fde4:8dba:82e1::/48)"))
    			}
    		// if we are here means that len(cidrs) == 1, we need to validate it
    		default:
    			if _, _, err := netutils.ParseCIDRSloppy(config.ClusterCIDR); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 13:25:06 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  10. pkg/controlplane/reconcilers/lease_test.go

    				// shutdown apiserver first
    				r.StopReconciling()
    				err = r.RemoveEndpoints(test.serviceName, netutils.ParseIPSloppy(test.ip), test.endpointPorts)
    				if err != nil {
    					t.Errorf("unexpected error remove endpoints: %v", err)
    				}
    
    				// reconcile endpoints in another goroutine
    				err = r.ReconcileEndpoints(test.serviceName, netutils.ParseIPSloppy(test.ip), test.endpointPorts, false)
    				if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 28.7K bytes
    - Viewed (0)
Back to top