Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 157 for netutils (0.24 sec)

  1. pkg/util/node/node_test.go

    			},
    			expectIPs: []net.IP{netutils.ParseIPSloppy("1.2.3.4")},
    		},
    		{
    			name: "IPv4-only, external-first",
    			addresses: []v1.NodeAddress{
    				{Type: v1.NodeExternalIP, Address: "4.3.2.1"},
    				{Type: v1.NodeExternalIP, Address: "4.3.2.2"},
    				{Type: v1.NodeInternalIP, Address: "1.2.3.4"},
    			},
    			expectIPs: []net.IP{netutils.ParseIPSloppy("1.2.3.4")},
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 27 23:24:38 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/cidrallocator_test.go

    		allocator, err := r.getAllocator(netutils.ParseIPSloppy("10.0.0.11"))
    		if err != nil {
    			return false, nil
    		}
    		allocator.ipAddressSynced = func() bool { return true }
    		return allocator.ready.Load(), nil
    	})
    	if err != nil {
    		t.Fatal(err)
    	}
    	// allocate one IP from the new allocator
    	err = r.Allocate(netutils.ParseIPSloppy("10.0.0.11"))
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  3. pkg/registry/core/service/ipallocator/ipallocator_test.go

    			if err := r.Release(released); err != nil {
    				t.Fatal(err)
    			}
    			for _, outOfRange := range tc.outOfRange {
    				err = r.Allocate(netutils.ParseIPSloppy(outOfRange))
    				if err == nil {
    					t.Fatalf("unexpacted allocating of %s", outOfRange)
    				}
    			}
    			if err := r.Allocate(netutils.ParseIPSloppy(tc.alreadyAllocated)); err == nil {
    				t.Fatalf("unexpected allocation of %s", tc.alreadyAllocated)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 25 13:14:46 UTC 2023
    - 24.2K 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/registry/core/service/ipallocator/controller/repair_test.go

    	}
    }
    
    func TestRepairLeakDualStack(t *testing.T) {
    	clearMetrics()
    	_, cidr, _ := netutils.ParseCIDRSloppy("192.168.1.0/24")
    	previous, err := ipallocator.NewInMemory(cidr)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	previous.Allocate(netutils.ParseIPSloppy("192.168.1.10"))
    
    	_, secondaryCIDR, _ := netutils.ParseCIDRSloppy("2000::/108")
    	secondaryPrevious, err := ipallocator.NewInMemory(secondaryCIDR)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. cmd/cloud-controller-manager/nodeipamcontroller.go

    		_, serviceCIDR, err = netutils.ParseCIDRSloppy(nodeIPAMConfig.ServiceCIDR)
    		if err != nil {
    			klog.ErrorS(err, "Unsuccessful parsing of service CIDR", "CIDR", nodeIPAMConfig.ServiceCIDR)
    		}
    	}
    
    	if len(strings.TrimSpace(nodeIPAMConfig.SecondaryServiceCIDR)) != 0 {
    		_, secondaryServiceCIDR, err = netutils.ParseCIDRSloppy(nodeIPAMConfig.SecondaryServiceCIDR)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 14 19:06:22 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top