Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getContainerPorts (0.19 sec)

  1. pkg/scheduler/framework/plugins/nodeports/node_ports.go

    }
    
    // Name returns name of the plugin. It is used in logs, etc.
    func (pl *NodePorts) Name() string {
    	return Name
    }
    
    // getContainerPorts returns the used host ports of Pods: if 'port' was used, a 'port:true' pair
    // will be in the result; but it does not resolve port conflict.
    func getContainerPorts(pods ...*v1.Pod) []*v1.ContainerPort {
    	ports := []*v1.ContainerPort{}
    	for _, pod := range pods {
    		for j := range pod.Spec.Containers {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 10:53:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. pkg/kube/inject/template.go

    func applicationPorts(containers []corev1.Container) string {
    	return getContainerPorts(containers, func(c corev1.Container) bool {
    		return c.Name != ProxyContainerName
    	})
    }
    
    func includeInboundPorts(containers []corev1.Container) string {
    	// Include the ports from all containers in the deployment.
    	return getContainerPorts(containers, func(corev1.Container) bool { return true })
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 16 02:12:03 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  3. pkg/test/framework/components/echo/kube/deployment.go

    		ObjectMeta: metav1.ObjectMeta{Name: serviceAccount},
    	}, metav1.CreateOptions{})
    	return err
    }
    
    // getContainerPorts converts the ports to a port list of container ports.
    // Adds ports for health/readiness if necessary.
    func getContainerPorts(cfg echo.Config) echoCommon.PortList {
    	ports := cfg.Ports
    	containerPorts := make(echoCommon.PortList, 0, len(ports))
    	var healthPort *echoCommon.Port
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 12:26:52 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/nodeports/node_ports_test.go

    					HostPort:      8014,
    					Protocol:      v1.ProtocolTCP,
    				},
    			},
    		},
    	}
    
    	for i, test := range tests {
    		t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) {
    			result := getContainerPorts(test.pod1, test.pod2)
    			if diff := cmp.Diff(test.expected, result); diff != "" {
    				t.Errorf("container ports: container ports does not match (-want,+got): %s", diff)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 11:02:11 UTC 2023
    - 10.1K bytes
    - Viewed (0)
Back to top