func (h *IPPortIndexer) GetIndexes(pod *Pod) []string {
	var hostPorts []string

	ip := pod.Status.PodIP
	if ip == "" {
		return hostPorts
	}

	// Add pod IP
	hostPorts = append(hostPorts, ip)

	for _, container := range pod.Spec.Containers {
		ports := container.Ports

		for _, port := range ports {
			if port.ContainerPort != int64(0) {
				hostPorts = append(hostPorts, fmt.Sprintf("%s:%d", ip, port.ContainerPort))
			}
		}
	}

	return hostPorts
}
// GetIndexes returns the indexes for the given Pod
GetIndexes returns the indexes for the given Pod
// GetIndexes returns the indexes for the given Pod
func (h *IPPortIndexer) GetIndexes(pod *Pod) []string {
	var hostPorts []string
	ip := pod.Status.PodIP
	if ip == "" {
		return hostPorts
	}
	hostPorts = append(hostPorts, ip)
	for _, container := range pod.Spec.Containers {
		ports := container.Ports
		for _, port := range ports {
			if port.ContainerPort != int64(0) {
				hostPorts = append(hostPorts, fmt.Sprintf("%s:%d", ip, port.ContainerPort))
			}
		}
	}
	return hostPorts
}
func ( h * IPPortIndexer ) GetIndexes ( pod * Pod ) [ ] string { var hostPorts [ ] string ip := pod . Status . PodIP if ip == " " { return hostPorts } hostPorts = append ( hostPorts , ip ) for _ , container := range pod . Spec . Containers { ports := container . Ports for _ , port := range ports { if port . ContainerPort != int64 ( 0 ) { hostPorts = append ( hostPorts , fmt . Sprintf ( " " , ip , port . ContainerPort ) ) } } } return hostPorts }
GetIndexes returns the indexes for the given Pod
GetIndexes returns the indexes for the given Pod
// Add pod IP