Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ParseIPSloppy (0.37 sec)

  1. 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)
  2. 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)
  3. pkg/controlplane/apiserver/config_test.go

    	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 {
    		t.Fatalf("failed to listen on 127.0.0.1:0")
    	}
    	defer ln.Close()
    	s.Listener = ln
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 12:14:06 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. pkg/proxy/util/utils.go

    func MapIPsByIPFamily(ipStrings []string) map[v1.IPFamily][]net.IP {
    	ipFamilyMap := map[v1.IPFamily][]net.IP{}
    	for _, ipStr := range ipStrings {
    		ip := netutils.ParseIPSloppy(ipStr)
    		if ip != nil {
    			// Since ip is parsed ok, GetIPFamilyFromIP will never return v1.IPFamilyUnknown
    			ipFamily := GetIPFamilyFromIP(ip)
    			ipFamilyMap[ipFamily] = append(ipFamilyMap[ipFamily], ip)
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go

    	// TODO have a "real" external address
    	if err := o.RecommendedOptions.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{netutils.ParseIPSloppy("127.0.0.1")}); err != nil {
    		return nil, fmt.Errorf("error creating self-signed certificates: %v", err)
    	}
    
    	serverConfig := genericapiserver.NewRecommendedConfig(apiserver.Codecs)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:57:37 UTC 2024
    - 6K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/phases/certs/renewal/readwriter_test.go

    			CommonName:   "test-common-name",
    			Organization: testCertOrganization,
    			Usages:       []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
    			AltNames: certutil.AltNames{
    				IPs:      []net.IP{netutils.ParseIPSloppy("10.100.0.1")},
    				DNSNames: []string{"test-domain.space"},
    			},
    			NotBefore: notBefore,
    		},
    		NotAfter: notAfter,
    	}
    	cert, key, err := pkiutil.NewCertAndKey(caCert, caKey, cfg)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 15:17:24 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top