func NewController(kubeclientset kubernetes.Interface, neutronClient *gophercloud.ServiceClient) *Controller {

	informerFactory := kubeinformers.NewSharedInformerFactoryWithOptions(kubeclientset, 0,
		kubeinformers.WithTweakListOptions(func(listOption *metav1.ListOptions) {
			listOption.AllowWatchBookmarks = true
		}))

	podInformer := informerFactory.Core().V1().Pods()

	controller := &Controller{
		kubeclientset:   kubeclientset,
		informerFactory: informerFactory,
		podsLister:      podInformer.Lister(),
		podsSynced:      podInformer.Informer().HasSynced,
		addPodQueue:     workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "AddPod"),
		deletePodQueue:  workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DeletePod"),
		updatePodQueue:  workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "UpdatePod"),
		podKeyMutex:     keymutex.New(97),
		neutronClient:   neutronClient,
	}

	podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc:    controller.enqueueAddPod,
		DeleteFunc: controller.enqueueDeletePod,
		UpdateFunc: controller.enqueueUpdatePod,
	})

	glog.Info("Setting up event handlers")
	// Set up an event handler for when Network resources change
	return controller
}
// NewController returns a new network controller
NewController returns a new network controller
// NewController returns a new network controller
func NewController(kubeclientset kubernetes.Interface, neutronClient *gophercloud.ServiceClient) *Controller {
	informerFactory := kubeinformers.NewSharedInformerFactoryWithOptions(kubeclientset, 0,
		kubeinformers.WithTweakListOptions(func(listOption *metav1.ListOptions) {
			listOption.AllowWatchBookmarks = true
		}))
	podInformer := informerFactory.Core().V1().Pods()
	controller := &Controller{
		kubeclientset:   kubeclientset,
		informerFactory: informerFactory,
		podsLister:      podInformer.Lister(),
		podsSynced:      podInformer.Informer().HasSynced,
		addPodQueue:     workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "AddPod"),
		deletePodQueue:  workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DeletePod"),
		updatePodQueue:  workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "UpdatePod"),
		podKeyMutex:     keymutex.New(97),
		neutronClient:   neutronClient,
	}
	podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc:    controller.enqueueAddPod,
		DeleteFunc: controller.enqueueDeletePod,
		UpdateFunc: controller.enqueueUpdatePod,
	})
	glog.Info("Setting up event handlers")
	return controller
}
func NewController ( kubeclientset kubernetes . Interface , neutronClient * gophercloud . ServiceClient ) * Controller { informerFactory := kubeinformers . NewSharedInformerFactoryWithOptions ( kubeclientset , 0 , kubeinformers . WithTweakListOptions ( func ( listOption * metav1 . ListOptions ) { listOption . AllowWatchBookmarks = true } ) ) podInformer := informerFactory . Core ( ) . V1 ( ) . Pods ( ) controller := & Controller { kubeclientset : kubeclientset , informerFactory : informerFactory , podsLister : podInformer . Lister ( ) , podsSynced : podInformer . Informer ( ) . HasSynced , addPodQueue : workqueue . NewNamedRateLimitingQueue ( workqueue . DefaultControllerRateLimiter ( ) , " " ) , deletePodQueue : workqueue . NewNamedRateLimitingQueue ( workqueue . DefaultControllerRateLimiter ( ) , " " ) , updatePodQueue : workqueue . NewNamedRateLimitingQueue ( workqueue . DefaultControllerRateLimiter ( ) , " " ) , podKeyMutex : keymutex . New ( 97 ) , neutronClient : neutronClient , } podInformer . Informer ( ) . AddEventHandler ( cache . ResourceEventHandlerFuncs { AddFunc : controller . enqueueAddPod , DeleteFunc : controller . enqueueDeletePod , UpdateFunc : controller . enqueueUpdatePod , } ) glog . Info ( " " ) return controller }
NewController returns a new network controller
NewController returns a new network controller
// Set up an event handler for when Network resources change