Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for netutils (0.14 sec)

  1. pkg/proxy/util/utils.go

    func convertToV1IPFamily(ipFamily netutils.IPFamily) v1.IPFamily {
    	switch ipFamily {
    	case netutils.IPv4:
    		return v1.IPv4Protocol
    	case netutils.IPv6:
    		return v1.IPv6Protocol
    	}
    
    	return v1.IPFamilyUnknown
    }
    
    // OtherIPFamily returns the other ip family
    func OtherIPFamily(ipFamily v1.IPFamily) v1.IPFamily {
    	if ipFamily == v1.IPv6Protocol {
    		return v1.IPv4Protocol
    	}
    
    	return v1.IPv6Protocol
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. 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)
  3. pkg/proxy/util/endpoints.go

    */
    
    package util
    
    import (
    	"net"
    
    	"k8s.io/klog/v2"
    	netutils "k8s.io/utils/net"
    )
    
    // IPPart returns just the IP part of an IP or IP:port or endpoint string. If the IP
    // part is an IPv6 address enclosed in brackets (e.g. "[fd00:1::5]:9999"),
    // then the brackets are stripped as well.
    func IPPart(s string) string {
    	if ip := netutils.ParseIPSloppy(s); ip != nil {
    		// IP address without port
    		return s
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 1.3K 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/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)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go

    	"k8s.io/apiserver/pkg/util/openapi"
    	"k8s.io/apiserver/pkg/util/proxy"
    	"k8s.io/apiserver/pkg/util/webhook"
    	scheme "k8s.io/client-go/kubernetes/scheme"
    	corev1 "k8s.io/client-go/listers/core/v1"
    	netutils "k8s.io/utils/net"
    )
    
    const defaultEtcdPathPrefix = "/registry/apiextensions.kubernetes.io"
    
    // CustomResourceDefinitionsServerOptions describes the runtime options of an apiextensions-apiserver.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:57:37 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/phases/certs/renewal/readwriter_test.go

    import (
    	"crypto"
    	"crypto/x509"
    	"fmt"
    	"net"
    	"os"
    	"path/filepath"
    	"testing"
    	"time"
    
    	"k8s.io/client-go/tools/clientcmd"
    	certutil "k8s.io/client-go/util/cert"
    	"k8s.io/client-go/util/keyutil"
    	netutils "k8s.io/utils/net"
    
    	kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
    	kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig"
    	"k8s.io/kubernetes/cmd/kubeadm/app/util/pkiutil"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 15:17:24 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  9. cni/pkg/install/kubeconfig_test.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package install
    
    import (
    	"os"
    	"path/filepath"
    	"testing"
    
    	"istio.io/istio/cni/pkg/config"
    	testutils "istio.io/istio/pilot/test/util"
    )
    
    const (
    	k8sServiceHost = "10.96.0.1"
    	k8sServicePort = "443"
    	kubeCAFilepath = "testdata/kube-ca.crt"
    	saToken        = "service_account_token_string"
    )
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 21:52:29 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. tools/istio-iptables/pkg/config/config.go

    package config
    
    import (
    	"encoding/json"
    	"fmt"
    	"net"
    	"net/netip"
    	"os/user"
    	"strconv"
    	"strings"
    	"time"
    
    	"github.com/miekg/dns"
    
    	"istio.io/istio/pkg/env"
    	"istio.io/istio/pkg/log"
    	netutil "istio.io/istio/pkg/util/net"
    	"istio.io/istio/tools/istio-iptables/pkg/constants"
    )
    
    func DefaultConfig() *Config {
    	return &Config{
    		RestoreFormat:           true,
    		ProxyPort:               "15001",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 22:24:38 UTC 2024
    - 9.2K bytes
    - Viewed (0)
Back to top