code: func NewController(
  	config *Config,
  	kubeClient clientset.Interface,
  	cloud cloudprovider.Interface,
  	clusterCIDR, serviceCIDR *net.IPNet,
  	nodeCIDRMaskSize int) (*Controller, error) {
  
  	if !nodesync.IsValidMode(config.Mode) {
  		return nil, fmt.Errorf("invalid IPAM controller mode %q", config.Mode)
  	}
  
  	gceCloud, ok := cloud.(*gce.Cloud)
  	if !ok {
  		return nil, fmt.Errorf("cloud IPAM controller does not support %q provider", cloud.ProviderName())
  	}
  
  	set, err := cidrset.NewCIDRSet(clusterCIDR, nodeCIDRMaskSize)
  	if err != nil {
  		return nil, err
  	}
  
  	c := &Controller{
  		config:  config,
  		adapter: newAdapter(kubeClient, gceCloud),
  		syncers: make(map[string]*nodesync.NodeSync),
  		set:     set,
  	}
  
  	if err := occupyServiceCIDR(c.set, clusterCIDR, serviceCIDR); err != nil {
  		return nil, err
  	}
  
  	return c, nil
  }
docs: // NewController returns a new instance of the IPAM controller.