Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 157 for netutils (0.13 sec)

  1. 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)
  2. cmd/kube-apiserver/app/options/validation.go

    		serviceIPRange, _, err := controlplaneapiserver.ServiceIPRange(extra.PrimaryServiceClusterIPRange)
    		if err != nil {
    			return []error{fmt.Errorf("error determining service IP ranges: %w", err)}
    		}
    		if netutils.IsIPv4CIDR(&serviceIPRange) != netutils.IsIPv4(generic.AdvertiseAddress) {
    			return []error{fmt.Errorf("service IP family %q must match public address family %q", extra.PrimaryServiceClusterIPRange.String(), generic.AdvertiseAddress.String())}
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 6.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/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)
  5. pkg/controller/nodeipam/ipam/test/utils.go

    	"k8s.io/kubernetes/pkg/controller/testutil"
    	netutils "k8s.io/utils/net"
    )
    
    const NodePollInterval = 10 * time.Millisecond
    
    var AlwaysReady = func() bool { return true }
    
    // MustParseCIDR returns the CIDR range parsed from s or panics if the string
    // cannot be parsed.
    func MustParseCIDR(s string) *net.IPNet {
    	_, ret, err := netutils.ParseCIDRSloppy(s)
    	if err != nil {
    		panic(err)
    	}
    	return ret
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 06 00:10:39 UTC 2022
    - 2K bytes
    - Viewed (0)
  6. 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)
  7. pkg/util/flag/flags.go

    	// Both IP and IP:port are valid.
    	// Attempt to parse into IP first.
    	if netutils.ParseIPSloppy(s) != nil {
    		*v.Val = s
    		return nil
    	}
    
    	// Can not parse into IP, now assume IP:port.
    	host, port, err := net.SplitHostPort(s)
    	if err != nil {
    		return fmt.Errorf("%q is not in a valid format (ip or ip:port): %v", s, err)
    	}
    	if netutils.ParseIPSloppy(host) == nil {
    		return fmt.Errorf("%q is not a valid IP address", host)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 19 03:30:46 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  8. 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)
  9. pkg/controlplane/apiserver/config_test.go

    	"k8s.io/kubernetes/pkg/controlplane/apiserver/options"
    	generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi"
    	netutils "k8s.io/utils/net"
    )
    
    func TestBuildGenericConfig(t *testing.T) {
    	opts := options.NewOptions()
    	s := (&apiserveroptions.SecureServingOptions{
    		BindAddress: netutils.ParseIPSloppy("127.0.0.1"),
    	}).WithLoopback()
    	ln, err := net.Listen("tcp", "127.0.0.1:0")
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 12:14:06 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  10. pkg/util/node/node.go

    	for _, addr := range node.Status.Addresses {
    		if addr.Type == v1.NodeInternalIP {
    			ip := netutils.ParseIPSloppy(addr.Address)
    			if ip != nil {
    				allIPs = append(allIPs, ip)
    			}
    		}
    	}
    	for _, addr := range node.Status.Addresses {
    		if addr.Type == v1.NodeExternalIP {
    			ip := netutils.ParseIPSloppy(addr.Address)
    			if ip != nil {
    				allIPs = append(allIPs, ip)
    			}
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 27 23:24:38 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top