// Convert_core_ServicePort_To_v1_ServicePort is an autogenerated conversion function.
556847
func Convert_core_ServicePort_To_v1_ServicePort(in *core.ServicePort, out *v1.ServicePort, s conversion.Scope) error {
	return autoConvert_core_ServicePort_To_v1_ServicePort(in, out, s)
}
95302
func Convert_core_Service_To_v1_Service(in *core.Service, out *v1.Service, s conversion.Scope) error {
	return autoConvert_core_Service_To_v1_Service(in, out, s)
}
28167
func Convert_v1_ServiceSpec_To_core_ServiceSpec(in *v1.ServiceSpec, out *core.ServiceSpec, s conversion.Scope) error {
	return autoConvert_v1_ServiceSpec_To_core_ServiceSpec(in, out, s)
}
290861
func Convert_core_VolumeSource_To_v1_VolumeSource(in *core.VolumeSource, out *v1.VolumeSource, s conversion.Scope) error {
	return autoConvert_core_VolumeSource_To_v1_VolumeSource(in, out, s)
}
80461
func Convert_v1_ContainerPort_To_core_ContainerPort(in *v1.ContainerPort, out *core.ContainerPort, s conversion.Scope) error {
	return autoConvert_v1_ContainerPort_To_core_ContainerPort(in, out, s)
}
829377
func Convert_core_Container_To_v1_Container(in *core.Container, out *v1.Container, s conversion.Scope) error {
	return autoConvert_core_Container_To_v1_Container(in, out, s)
}
348912
func Convert_v1_ContainerState_To_core_ContainerState(in *v1.ContainerState, out *core.ContainerState, s conversion.Scope) error {
	return autoConvert_v1_ContainerState_To_core_ContainerState(in, out, s)
}
1076916
func Convert_v1_VolumeSource_To_core_VolumeSource(in *v1.VolumeSource, out *core.VolumeSource, s conversion.Scope) error {
	return autoConvert_v1_VolumeSource_To_core_VolumeSource(in, out, s)
}
322694
func Convert_v1_EndpointsList_To_core_EndpointsList(in *v1.EndpointsList, out *core.EndpointsList, s conversion.Scope) error {
	return autoConvert_v1_EndpointsList_To_core_EndpointsList(in, out, s)
}
595355
func Convert_v1_Service_To_core_Service(in *v1.Service, out *core.Service, s conversion.Scope) error {
	return autoConvert_v1_Service_To_core_Service(in, out, s)
}
1353373
func Convert_v1_ClientIPConfig_To_core_ClientIPConfig(in *v1.ClientIPConfig, out *core.ClientIPConfig, s conversion.Scope) error {
	return autoConvert_v1_ClientIPConfig_To_core_ClientIPConfig(in, out, s)
}
114548
func Convert_core_ContainerStateWaiting_To_v1_ContainerStateWaiting(in *core.ContainerStateWaiting, out *v1.ContainerStateWaiting, s conversion.Scope) error {
	return autoConvert_core_ContainerStateWaiting_To_v1_ContainerStateWaiting(in, out, s)
}
591112
func Convert_image_ImageStreamImport_To_v1_ImageStreamImport(in *image.ImageStreamImport, out *v1.ImageStreamImport, s conversion.Scope) error {
	return autoConvert_image_ImageStreamImport_To_v1_ImageStreamImport(in, out, s)
}
911430
func Convert_v1_ContainerStateWaiting_To_core_ContainerStateWaiting(in *v1.ContainerStateWaiting, out *core.ContainerStateWaiting, s conversion.Scope) error {
	return autoConvert_v1_ContainerStateWaiting_To_core_ContainerStateWaiting(in, out, s)
}
1207859
func Convert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(in *auditregistration.ServiceReference, out *v1alpha1.ServiceReference, s conversion.Scope) error {
	return autoConvert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(in, out, s)
}
881160
func Convert_route_RoutePort_To_v1_RoutePort(in *route.RoutePort, out *v1.RoutePort, s conversion.Scope) error {
	return autoConvert_route_RoutePort_To_v1_RoutePort(in, out, s)
}
1142018
func portForServicePort(svc *service.Service, portStr string, pType string) *service.Port {
	// Look up the ServicePort and translate to Docker port
	svcPort, err := strconv.ParseInt(portStr, 10, 64)
	if err != nil {
		log.Warnf(
			"SidecarListener label found on %s, can't decode port '%s'",
			svc.ID, portStr,
		)
		return nil
	}

	for _, port := range svc.Ports {
		if port.ServicePort == svcPort && port.Type == pType {
			return &port
		}
	}

	return nil
}