Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 182 for netutils (0.13 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. staging/src/k8s.io/apiserver/pkg/server/config_selfclient_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package server
    
    import (
    	"net"
    	"testing"
    
    	netutils "k8s.io/utils/net"
    )
    
    func TestLoopbackHostPortIPv4(t *testing.T) {
    	_, ipv6only, err := isIPv6LoopbackSupported()
    	if err != nil {
    		t.Fatalf("fail to enumerate network interface, %s", err)
    	}
    	if ipv6only {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. pkg/kubeapiserver/options/serving.go

    import (
    	genericoptions "k8s.io/apiserver/pkg/server/options"
    	netutils "k8s.io/utils/net"
    )
    
    // NewSecureServingOptions gives default values for the kube-apiserver which are not the options wanted by
    // "normal" API servers running on the platform
    func NewSecureServingOptions() *genericoptions.SecureServingOptionsWithLoopback {
    	o := genericoptions.SecureServingOptions{
    		BindAddress: netutils.ParseIPSloppy("0.0.0.0"),
    		BindPort:    6443,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 1.3K bytes
    - Viewed (0)
Back to top