code: func NewKubemarkController(externalClient kubeclient.Interface, externalInformerFactory informers.SharedInformerFactory,
  	kubemarkClient kubeclient.Interface, kubemarkNodeInformer informersv1.NodeInformer) (*KubemarkController, error) {
  	rcInformer := externalInformerFactory.InformerFor(&apiv1.ReplicationController{}, newReplicationControllerInformer)
  	podInformer := externalInformerFactory.InformerFor(&apiv1.Pod{}, newPodInformer)
  	controller := &KubemarkController{
  		externalCluster: externalCluster{
  			rcLister:  listersv1.NewReplicationControllerLister(rcInformer.GetIndexer()),
  			rcSynced:  rcInformer.HasSynced,
  			podLister: listersv1.NewPodLister(podInformer.GetIndexer()),
  			podSynced: podInformer.HasSynced,
  			client:    externalClient,
  		},
  		kubemarkCluster: kubemarkCluster{
  			nodeLister:        kubemarkNodeInformer.Lister(),
  			nodeSynced:        kubemarkNodeInformer.Informer().HasSynced,
  			client:            kubemarkClient,
  			nodesToDelete:     make(map[string]bool),
  			nodesToDeleteLock: sync.Mutex{},
  		},
  		rand:                   rand.New(rand.NewSource(time.Now().UnixNano())),
  		createNodeQueue:        make(chan string, 1000),
  		nodeGroupQueueSize:     make(map[string]int),
  		nodeGroupQueueSizeLock: sync.Mutex{},
  	}
  
  	kubemarkNodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
  		UpdateFunc: controller.kubemarkCluster.removeUnneededNodes,
  	})
  
  	return controller, nil
  }
docs: // NewKubemarkController creates KubemarkController using the provided clients to talk to external
  // and kubemark clusters.