code: func newCSCloud(cfg *CSConfig) (*CSCloud, error) {
  	cs := &CSCloud{
  		projectID: cfg.Global.ProjectID,
  		zone:      cfg.Global.Zone,
  	}
  
  	exe, err := osext.Executable()
  	if err != nil {
  		return nil, fmt.Errorf("cloud not find the service executable: %v", err)
  	}
  
  	// When running the kubelet service it's fine to not specify a config file (or only a
  	// partial config file) as all needed info can be retrieved anonymously using metadata.
  	if filepath.Base(exe) == "kubelet" || filepath.Base(exe) == "kubelet.exe" {
  		// In CloudStack your metadata is always served by the DHCP server.
  		dhcpServer, err := findDHCPServer()
  		if err == nil {
  			klog.V(4).Infof("Found metadata server: %v", dhcpServer)
  			cs.metadata = &metadata{dhcpServer: dhcpServer, zone: cs.zone}
  		} else {
  			klog.Errorf("Error searching metadata server: %v", err)
  		}
  	}
  
  	if cfg.Global.APIURL != "" && cfg.Global.APIKey != "" && cfg.Global.SecretKey != "" {
  		cs.client = cloudstack.NewAsyncClient(cfg.Global.APIURL, cfg.Global.APIKey, cfg.Global.SecretKey, !cfg.Global.SSLNoVerify)
  	}
  
  	if cs.client == nil {
  		if cs.metadata != nil {
  			klog.V(2).Infof("No API URL, key and secret are provided, so only using metadata!")
  		} else {
  			return nil, errors.New("no cloud provider config given")
  		}
  	}
  
  	return cs, nil
  }
docs: // newCSCloud creates a new instance of CSCloud.