code: func (nm *NodeManager) vcConnect(ctx context.Context, vsphereInstance *VSphereInstance) error {
  	err := vsphereInstance.conn.Connect(ctx)
  	if err == nil {
  		return nil
  	}
  
  	credentialManager := nm.CredentialManager()
  	if !vclib.IsInvalidCredentialsError(err) || credentialManager == nil {
  		klog.Errorf("Cannot connect to vCenter with err: %v", err)
  		return err
  	}
  
  	klog.V(4).Infof("Invalid credentials. Cannot connect to server %q. Fetching credentials from secrets.", vsphereInstance.conn.Hostname)
  
  	// Get latest credentials from SecretCredentialManager
  	credentials, err := credentialManager.GetCredential(vsphereInstance.conn.Hostname)
  	if err != nil {
  		klog.Errorf("Failed to get credentials from Secret Credential Manager with err: %v", err)
  		return err
  	}
  	vsphereInstance.conn.UpdateCredentials(credentials.User, credentials.Password)
  	return vsphereInstance.conn.Connect(ctx)
  }
docs: // vcConnect connects to vCenter with existing credentials
  // If credentials are invalid:
  // 		1. It will fetch credentials from credentialManager
  //      2. Update the credentials
  //		3. Connects again to vCenter with fetched credentials