code: func resolvePort(portReference intstr.IntOrString, container *v1.Container) (int, error) {
  	if portReference.Type == intstr.Int {
  		return portReference.IntValue(), nil
  	}
  	portName := portReference.StrVal
  	port, err := strconv.Atoi(portName)
  	if err == nil {
  		return port, nil
  	}
  	for _, portSpec := range container.Ports {
  		if portSpec.Name == portName {
  			return int(portSpec.ContainerPort), nil
  		}
  	}
  	return -1, fmt.Errorf("couldn't find port: %v in %v", portReference, container)
  }
docs: // resolvePort attempts to turn an IntOrString port reference into a concrete port number.
  // If portReference has an int value, it is treated as a literal, and simply returns that value.
  // If portReference is a string, an attempt is first made to parse it as an integer.  If that fails,
  // an attempt is made to find a port with the same name in the container spec.
  // If a port with the same name is found, it's ContainerPort value is returned.  If no matching
  // port is found, an error is returned.