Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 95 for ParseIPSloppy (0.18 sec)

  1. pkg/registry/core/service/ipallocator/controller/repair_test.go

    		}
    		if !after.Has(netutils.ParseIPSloppy("192.168.1.10")) {
    			t.Errorf("expected ipallocator to still have leaked IP")
    		}
    	}
    	// Run one more time to actually remove the leak.
    	if err := r.runOnce(); err != nil {
    		t.Fatal(err)
    	}
    	after, err := ipallocator.NewFromSnapshot(ipregistry.updated)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if after.Has(netutils.ParseIPSloppy("192.168.1.10")) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/bitmap_test.go

    				t.Fatal(err)
    			}
    			for _, outOfRange := range tc.outOfRange {
    				err = r.Allocate(netutils.ParseIPSloppy(outOfRange))
    				if _, ok := err.(*ErrNotInRange); !ok {
    					t.Fatal(err)
    				}
    			}
    			if err := r.Allocate(netutils.ParseIPSloppy(tc.alreadyAllocated)); err != ErrAllocated {
    				t.Fatal(err)
    			}
    			if f := r.Free(); f != 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  3. 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)
  4. pkg/kubelet/nodestatus/setters_test.go

    			// 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)
  5. pkg/registry/core/service/ipallocator/ipallocator_test.go

    				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)
    			}
    			if f := r.Free(); f != 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 25 13:14:46 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  6. 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"),
    				netutils.ParseIPSloppy("90.90.90.90"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  7. 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)
  8. pkg/proxy/util/endpoints.go

    func IPPart(s string) string {
    	if ip := netutils.ParseIPSloppy(s); ip != nil {
    		// IP address without port
    		return s
    	}
    	// Must be IP:port
    	host, _, err := net.SplitHostPort(s)
    	if err != nil {
    		klog.ErrorS(err, "Failed to parse host-port", "input", s)
    		return ""
    	}
    	// Check if host string is a valid IP address
    	ip := netutils.ParseIPSloppy(host)
    	if ip == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  9. pkg/proxy/winkernel/proxier_test.go

    	proxier.serviceChanges = serviceChanges
    
    	return proxier
    }
    
    func TestCreateServiceVip(t *testing.T) {
    	syncPeriod := 30 * time.Second
    	proxier := NewFakeProxier(syncPeriod, syncPeriod, "testhost", netutils.ParseIPSloppy("10.0.0.1"), NETWORK_TYPE_OVERLAY)
    	if proxier == nil {
    		t.Error()
    	}
    
    	svcIP := "10.20.30.41"
    	svcPort := 80
    	svcNodePort := 3001
    	svcExternalIPs := "50.60.70.81"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 28 14:30:51 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/config_selfclient_test.go

    	}
    	if port != "443" {
    		t.Fatalf("expected 443 as port, got %q", port)
    	}
    
    	host, port, err = LoopbackHostPort("0.0.0.0:443")
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	if ip := netutils.ParseIPSloppy(host); ip == nil || !ip.IsLoopback() {
    		t.Fatalf("expected host to be loopback, got %q", host)
    	}
    	if port != "443" {
    		t.Fatalf("expected 443 as port, got %q", port)
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 2.7K bytes
    - Viewed (0)
Back to top