Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 50 for netutils (0.15 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. 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)
  3. 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)
  4. 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)
  5. staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates.go

    */
    
    package dynamiccertificates
    
    import (
    	"crypto/tls"
    	"crypto/x509"
    	"fmt"
    	"strings"
    
    	corev1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/util/validation"
    	"k8s.io/klog/v2"
    	netutils "k8s.io/utils/net"
    )
    
    // BuildNamedCertificates returns a map of *tls.Certificate by name. It's
    // suitable for use in tls.Config#NamedCertificates. Returns an error if any of the certs
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 21 07:29:30 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  6. cmd/kube-apiserver/app/options/completion.go

    limitations under the License.
    */
    
    package options
    
    import (
    	"fmt"
    	"net"
    	"strings"
    
    	apiserveroptions "k8s.io/apiserver/pkg/server/options"
    	_ "k8s.io/component-base/metrics/prometheus/workqueue"
    	netutils "k8s.io/utils/net"
    
    	controlplane "k8s.io/kubernetes/pkg/controlplane/apiserver/options"
    	"k8s.io/kubernetes/pkg/kubeapiserver"
    	kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options"
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 26 19:50:38 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  7. pkg/proxy/ipvs/netlink_linux.go

    limitations under the License.
    */
    
    package ipvs
    
    import (
    	"fmt"
    	"net"
    
    	"k8s.io/apimachinery/pkg/util/sets"
    	"k8s.io/klog/v2"
    	proxyutil "k8s.io/kubernetes/pkg/proxy/util"
    	netutils "k8s.io/utils/net"
    
    	"github.com/vishvananda/netlink"
    	"golang.org/x/sys/unix"
    )
    
    type netlinkHandle struct {
    	netlink.Handle
    	isIPv6 bool
    }
    
    // NewNetLinkHandle will create a new NetLinkHandle
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 30 16:18:49 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  8. pkg/proxy/util/localdetector.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package util
    
    import (
    	netutils "k8s.io/utils/net"
    )
    
    // LocalTrafficDetector generates iptables or nftables rules to detect traffic from local pods.
    type LocalTrafficDetector interface {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 15:34:37 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/componentconfigs/kubeproxy.go

    limitations under the License.
    */
    
    package componentconfigs
    
    import (
    	"github.com/pkg/errors"
    	clientset "k8s.io/client-go/kubernetes"
    	"k8s.io/klog/v2"
    	kubeproxyconfig "k8s.io/kube-proxy/config/v1alpha1"
    	netutils "k8s.io/utils/net"
    
    	kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
    	kubeadmapiv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3"
    	kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 03:01:30 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/util/apiclient/init_dryrun.go

    		// We can't handle this event
    		return false, nil, nil
    	}
    
    	_, svcSubnet, err := netutils.ParseCIDRSloppy(idr.serviceSubnet)
    	if err != nil {
    		return true, nil, errors.Wrapf(err, "error parsing CIDR %q", idr.serviceSubnet)
    	}
    
    	internalAPIServerVirtualIP, err := netutils.GetIndexedIP(svcSubnet, 1)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:17:50 UTC 2023
    - 5.3K bytes
    - Viewed (0)
Back to top