Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 96 for netutils (0.18 sec)

  1. pkg/controller/nodeipam/ipam/range_allocator_test.go

    					_, clusterCIDRv4, _ := netutils.ParseCIDRSloppy("127.123.234.0/8")
    					_, clusterCIDRv6, _ := netutils.ParseCIDRSloppy("ace:cab:deca::/84")
    					_, clusterCIDRv4_2, _ := netutils.ParseCIDRSloppy("10.0.0.0/8")
    					return []*net.IPNet{clusterCIDRv4, clusterCIDRv6, clusterCIDRv4_2}
    				}(),
    				ServiceCIDR: func() *net.IPNet {
    					_, serviceCIDR, _ := netutils.ParseCIDRSloppy("127.123.234.0/26")
    					return serviceCIDR
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  2. 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
    }
    
    // OtherIPFamily returns the other ip family
    func OtherIPFamily(ipFamily v1.IPFamily) v1.IPFamily {
    	if ipFamily == v1.IPv6Protocol {
    		return v1.IPv4Protocol
    	}
    
    	return v1.IPv6Protocol
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  3. pkg/proxy/util/nodeport_addresses_test.go

    					addrs: []net.Addr{
    						&net.IPNet{IP: netutils.ParseIPSloppy("1.2.3.4"), Mask: net.CIDRMask(30, 32)},
    						&net.IPNet{IP: netutils.ParseIPSloppy("2001:db8::1"), Mask: net.CIDRMask(64, 128)},
    					},
    				},
    				{
    					itf: net.Interface{Index: 1, MTU: 0, Name: "lo", HardwareAddr: nil, Flags: 0},
    					addrs: []net.Addr{
    						&net.IPNet{IP: netutils.ParseIPSloppy("127.0.0.1"), Mask: net.CIDRMask(8, 32)},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 13:25:06 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  4. cmd/kube-apiserver/app/options/validation_test.go

    	_, ipv4cidr, err := netutils.ParseCIDRSloppy("192.168.0.0/24")
    	if err != nil {
    		t.Fatalf("Unexpected error %v", err)
    	}
    
    	_, ipv6cidr, err := netutils.ParseCIDRSloppy("2001:db8::/112")
    	if err != nil {
    		t.Fatalf("Unexpected error %v", err)
    	}
    
    	ipv4address := netutils.ParseIPSloppy("192.168.1.1")
    	ipv6address := netutils.ParseIPSloppy("2001:db8::1")
    
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  5. pkg/kubelet/certificate/kubelet_test.go

    				{Type: v1.NodeInternalIP, Address: "3.3.3.3"},
    			},
    			wantDNSNames: []string{"hostname-1", "hostname-2", "hostname-3"},
    			wantIPs:      []net.IP{netutils.ParseIPSloppy("1.1.1.1"), netutils.ParseIPSloppy("2.2.2.2"), netutils.ParseIPSloppy("3.3.3.3")},
    		},
    		{
    			name: "handle IP and DNS hostnames",
    			addresses: []v1.NodeAddress{
    				{Type: v1.NodeHostName, Address: "hostname"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 03:07:40 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. pkg/kubelet/nodestatus/setters_test.go

    			// IPs" etc because we won't have gotten this far with an invalid
    			// config like that.
    			name:              "Dual-stack cloud, with dual-stack nodeIPs",
    			nodeIP:            netutils.ParseIPSloppy("2600:1f14:1d4:d101::ba3d"),
    			secondaryNodeIP:   netutils.ParseIPSloppy("10.1.1.2"),
    			cloudProviderType: cloudProviderExternal,
    			nodeAddresses: []v1.NodeAddress{
    				{Type: v1.NodeInternalIP, Address: "10.1.1.1"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 21:47:24 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  7. pkg/proxy/util/endpoints.go

    */
    
    package util
    
    import (
    	"net"
    
    	"k8s.io/klog/v2"
    	netutils "k8s.io/utils/net"
    )
    
    // IPPart returns just the IP part of an IP or IP:port or endpoint string. If the IP
    // part is an IPv6 address enclosed in brackets (e.g. "[fd00:1::5]:9999"),
    // then the brackets are stripped as well.
    func IPPart(s string) string {
    	if ip := netutils.ParseIPSloppy(s); ip != nil {
    		// IP address without port
    		return s
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. 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)
  9. pkg/proxy/ipvs/proxier_test.go

    						Port:     80,
    						Protocol: "TCP",
    					}: {
    						Address:   netutils.ParseIPSloppy("10.20.30.41"),
    						Protocol:  "TCP",
    						Port:      uint16(80),
    						Scheduler: "rr",
    					},
    					{
    						IP:       "100.101.102.103",
    						Port:     3001,
    						Protocol: "TCP",
    					}: {
    						Address:   netutils.ParseIPSloppy("100.101.102.103"),
    						Protocol:  "TCP",
    						Port:      uint16(3001),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 01:31:57 UTC 2024
    - 186.8K bytes
    - Viewed (0)
  10. pkg/proxy/util/nodeport_addresses.go

    		if (family == v1.IPv4Protocol) == netutils.IsIPv4CIDRString(str) {
    			npa.cidrStrings = append(npa.cidrStrings, str)
    		}
    	}
    	if len(npa.cidrStrings) == 0 {
    		if family == v1.IPv4Protocol {
    			npa.cidrStrings = []string{IPv4ZeroCIDR}
    		} else {
    			npa.cidrStrings = []string{IPv6ZeroCIDR}
    		}
    	}
    
    	// Now parse
    	for _, str := range npa.cidrStrings {
    		_, cidr, _ := netutils.ParseCIDRSloppy(str)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 13:25:06 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top