Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 182 for netutils (0.2 sec)

  1. 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)
  2. staging/src/k8s.io/apiserver/pkg/server/options/serving_with_loopback_test.go

    package options
    
    import (
    	"net"
    	"testing"
    
    	"k8s.io/apiserver/pkg/server"
    	"k8s.io/client-go/rest"
    	netutils "k8s.io/utils/net"
    )
    
    func TestEmptyMainCert(t *testing.T) {
    	secureServingInfo := &server.SecureServingInfo{}
    	var loopbackClientConfig *rest.Config
    
    	s := (&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 Aug 20 08:42:09 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/addresses_test.go

    limitations under the License.
    */
    
    package discovery
    
    import (
    	"net/http"
    	"reflect"
    	"testing"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	utilnet "k8s.io/apimachinery/pkg/util/net"
    	netutils "k8s.io/utils/net"
    )
    
    func TestGetServerAddressByClientCIDRs(t *testing.T) {
    	publicAddressCIDRMap := []metav1.ServerAddressByClientCIDR{
    		{
    			ClientCIDR:    "0.0.0.0/0",
    			ServerAddress: "ExternalAddress",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/util/endpoint.go

    limitations under the License.
    */
    
    package util
    
    import (
    	"net"
    	"net/url"
    	"strconv"
    
    	"github.com/pkg/errors"
    
    	"k8s.io/apimachinery/pkg/util/validation"
    	"k8s.io/klog/v2"
    	netutils "k8s.io/utils/net"
    
    	kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
    )
    
    // GetControlPlaneEndpoint returns a properly formatted endpoint for the control plane built according following rules:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jan 11 15:08:59 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  9. pkg/proxy/winkernel/proxier_test.go

    	"k8s.io/apimachinery/pkg/types"
    	"k8s.io/apimachinery/pkg/util/intstr"
    	"k8s.io/kubernetes/pkg/proxy"
    	"k8s.io/kubernetes/pkg/proxy/healthcheck"
    	fakehcn "k8s.io/kubernetes/pkg/proxy/winkernel/testing"
    	netutils "k8s.io/utils/net"
    	"k8s.io/utils/ptr"
    )
    
    const (
    	testHostName      = "test-hostname"
    	testNetwork       = "TestNetwork"
    	ipAddress         = "10.0.0.1"
    	prefixLen         = 24
    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.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package server
    
    import (
    	"fmt"
    	"net"
    
    	restclient "k8s.io/client-go/rest"
    	netutils "k8s.io/utils/net"
    )
    
    // LoopbackClientServerNameOverride is passed to the apiserver from the loopback client in order to
    // select the loopback certificate via SNI if TLS is used.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 23 00:06:34 UTC 2021
    - 3.1K bytes
    - Viewed (0)
Back to top