code: func initClusterIP(service *api.Service, serviceIPs ipallocator.Interface) (bool, error) {
  	switch {
  	case service.Spec.ClusterIP == "":
  		// Allocate next available.
  		ip, err := serviceIPs.AllocateNext()
  		if err != nil {
  			// TODO: what error should be returned here?  It's not a
  			// field-level validation failure (the field is valid), and it's
  			// not really an internal error.
  			return false, errors.NewInternalError(fmt.Errorf("failed to allocate a serviceIP: %v", err))
  		}
  		service.Spec.ClusterIP = ip.String()
  		return true, nil
  	case service.Spec.ClusterIP != api.ClusterIPNone && service.Spec.ClusterIP != "":
  		// Try to respect the requested IP.
  		if err := serviceIPs.Allocate(net.ParseIP(service.Spec.ClusterIP)); err != nil {
  			// TODO: when validation becomes versioned, this gets more complicated.
  			el := field.ErrorList{field.Invalid(field.NewPath("spec", "clusterIP"), service.Spec.ClusterIP, err.Error())}
  			return false, errors.NewInvalid(api.Kind("Service"), service.Name, el)
  		}
  		return true, nil
  	}
  
  	return false, nil
  }
docs: // The return bool value indicates if a cluster IP is allocated successfully.