// NewMizarPodController creates and configures a new controller instance
NewMizarPodController creates and configures a new controller instance
// NewMizarPodController creates and configures a new controller instance
func NewMizarPodController(podInformer coreinformers.PodInformer, kubeClient clientset.Interface, arktosNetworkInformer arktosinformer.NetworkInformer, grpcHost string, grpcAdaptor IGrpcAdaptor) *MizarPodController {
	eventBroadcaster := record.NewBroadcaster()
	eventBroadcaster.StartLogging(klog.Infof)
	eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().EventsWithMultiTenancy(metav1.NamespaceAll, metav1.TenantAll)})
	c := &MizarPodController{
		kubeClient:          kubeClient,
		networkLister:       arktosNetworkInformer.Lister(),
		networkListerSynced: arktosNetworkInformer.Informer().HasSynced,
		lister:              podInformer.Lister(),
		listerSynced:        podInformer.Informer().HasSynced,
		queue:               workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), controllerForMizarPod),
		grpcHost:            grpcHost,
		grpcAdaptor:         grpcAdaptor,
	}
	podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc:    c.createObj,
		UpdateFunc: c.updateObj,
		DeleteFunc: c.deleteObj,
	})
	c.lister = podInformer.Lister()
	c.listerSynced = podInformer.Informer().HasSynced
	c.handler = c.handle
	return c
}
func NewMizarPodController ( podInformer coreinformers . PodInformer , kubeClient clientset . Interface , arktosNetworkInformer arktosinformer . NetworkInformer , grpcHost string , grpcAdaptor IGrpcAdaptor ) * MizarPodController { eventBroadcaster := record . NewBroadcaster ( ) eventBroadcaster . StartLogging ( klog . Infof ) eventBroadcaster . StartRecordingToSink ( & v1core . EventSinkImpl { Interface : kubeClient . CoreV1 ( ) . EventsWithMultiTenancy ( metav1 . NamespaceAll , metav1 . TenantAll ) } ) c := & MizarPodController { kubeClient : kubeClient , networkLister : arktosNetworkInformer . Lister ( ) , networkListerSynced : arktosNetworkInformer . Informer ( ) . HasSynced , lister : podInformer . Lister ( ) , listerSynced : podInformer . Informer ( ) . HasSynced , queue : workqueue . NewNamedRateLimitingQueue ( workqueue . DefaultControllerRateLimiter ( ) , controllerForMizarPod ) , grpcHost : grpcHost , grpcAdaptor : grpcAdaptor , } podInformer . Informer ( ) . AddEventHandler ( cache . ResourceEventHandlerFuncs { AddFunc : c . createObj , UpdateFunc : c . updateObj , DeleteFunc : c . deleteObj , } ) c . lister = podInformer . Lister ( ) c . listerSynced = podInformer . Informer ( ) . HasSynced c . handler = c . handle return c }
NewMizarPodController creates and configures a new controller instance
NewMizarPodController creates and configures a new controller instance