Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ConvertProtocol (0.25 sec)

  1. pkg/config/kube/conversion.go

    var wellKnownPorts = sets.New[int32](
    	SMTP,
    	DNS,
    	MySQL,
    	MongoDB,
    )
    
    var (
    	grpcWeb    = string(protocol.GRPCWeb)
    	grpcWebLen = len(grpcWeb)
    )
    
    // ConvertProtocol from k8s protocol and port name
    func ConvertProtocol(port int32, portName string, proto corev1.Protocol, appProto *string) protocol.Instance {
    	if proto == corev1.ProtocolUDP {
    		return protocol.UDP
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 02:03:58 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  2. pkg/config/kube/conversion_test.go

    			expectedProto: protocol.HTTP2,
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			actualProto := ConvertProtocol(tc.port, tc.portName, tc.proto, tc.appProto)
    			if actualProto != tc.expectedProto {
    				t.Errorf("ConvertProtocol(%d, %s, %s, %v) => %s, want %s",
    					tc.port, tc.portName, tc.proto, tc.appProto, actualProto, tc.expectedProto)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 28 15:30:30 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/conversion_test.go

    	for _, c := range cases {
    		testName := strings.Replace(fmt.Sprintf("%s_%s_%d", c.name, c.proto, c.port), "-", "_", -1)
    		t.Run(testName, func(t *testing.T) {
    			out := kube.ConvertProtocol(c.port, c.name, c.proto, c.appProtocol)
    			if out != c.out {
    				t.Fatalf("convertProtocol(%d, %q, %q) => %q, want %q", c.port, c.name, c.proto, out, c.out)
    			}
    		})
    	}
    }
    
    func BenchmarkConvertProtocol(b *testing.B) {
    	cases := []struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. pkg/config/analysis/analyzers/service/portname.go

    		v == constants.ManagedGatewayControllerLabel ||
    		v == constants.ManagedGatewayMeshControllerLabel {
    		return
    	}
    	for i, port := range svc.Ports {
    		instance := configKube.ConvertProtocol(port.Port, port.Name, port.Protocol, port.AppProtocol)
    		if instance.IsUnsupported() || port.Name == "tcp" && svc.Type == "ExternalName" {
    
    			m := msg.NewPortNameIsNotUnderNamingConvention(
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Sep 15 14:45:58 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/conversion.go

    	"istio.io/istio/pkg/spiffe"
    	"istio.io/istio/pkg/util/sets"
    )
    
    func convertPort(port corev1.ServicePort) *model.Port {
    	return &model.Port{
    		Name:     port.Name,
    		Port:     int(port.Port),
    		Protocol: kube.ConvertProtocol(port.Port, port.Name, port.Protocol, port.AppProtocol),
    	}
    }
    
    func ConvertService(svc corev1.Service, domainSuffix string, clusterID cluster.ID, mesh *meshconfig.MeshConfig) *model.Service {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. istioctl/pkg/describe/describe.go

    	var protocol string
    	if port.Name == "" && port.AppProtocol == nil && port.Protocol != corev1.ProtocolUDP {
    		protocol = "auto-detect"
    	} else {
    		protocol = string(configKube.ConvertProtocol(port.Port, port.Name, port.Protocol, port.AppProtocol))
    	}
    	return protocol
    }
    
    func isMeshed(pod *corev1.Pod) bool {
    	return inject.FindSidecar(pod) != nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 50.4K bytes
    - Viewed (0)
Back to top