func NewMonitorController(namespace string, kubeClient kubernetes.Interface, config config.Config, resource string, restClient rest.Interface) *MonitorController {
	controller := &MonitorController{
		kubeClient: kubeClient,
		namespace:  namespace,
		config:     config,
	}

	controller.monitorServices = setupMonitorServicesForProviders(config.Providers)

	queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter())

	// Create the Ingress Watcher
	ingressListWatcher := cache.NewListWatchFromClient(restClient, resource, namespace, fields.Everything())

	indexer, informer := cache.NewIndexerInformer(ingressListWatcher, kube.ResourceMap[resource], 0, cache.ResourceEventHandlerFuncs{
		AddFunc:    controller.onResourceAdded,
		UpdateFunc: controller.onResourceUpdated,
		DeleteFunc: controller.onResourceDeleted,
	}, cache.Indexers{})

	controller.indexer = indexer
	controller.informer = informer
	controller.queue = queue

	return controller
}
// NewMonitorController implements a controller to monitor ingresses and routes
NewMonitorController implements a controller to monitor ingresses and routes
// NewMonitorController implements a controller to monitor ingresses and routes
func NewMonitorController(namespace string, kubeClient kubernetes.Interface, config config.Config, resource string, restClient rest.Interface) *MonitorController {
	controller := &MonitorController{
		kubeClient: kubeClient,
		namespace:  namespace,
		config:     config,
	}
	controller.monitorServices = setupMonitorServicesForProviders(config.Providers)
	queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter())
	ingressListWatcher := cache.NewListWatchFromClient(restClient, resource, namespace, fields.Everything())
	indexer, informer := cache.NewIndexerInformer(ingressListWatcher, kube.ResourceMap[resource], 0, cache.ResourceEventHandlerFuncs{
		AddFunc:    controller.onResourceAdded,
		UpdateFunc: controller.onResourceUpdated,
		DeleteFunc: controller.onResourceDeleted,
	}, cache.Indexers{})
	controller.indexer = indexer
	controller.informer = informer
	controller.queue = queue
	return controller
}
func NewMonitorController ( namespace string , kubeClient kubernetes . Interface , config config . Config , resource string , restClient rest . Interface ) * MonitorController { controller := & MonitorController { kubeClient : kubeClient , namespace : namespace , config : config , } controller . monitorServices = setupMonitorServicesForProviders ( config . Providers ) queue := workqueue . NewRateLimitingQueue ( workqueue . DefaultControllerRateLimiter ( ) ) ingressListWatcher := cache . NewListWatchFromClient ( restClient , resource , namespace , fields . Everything ( ) ) indexer , informer := cache . NewIndexerInformer ( ingressListWatcher , kube . ResourceMap [ resource ] , 0 , cache . ResourceEventHandlerFuncs { AddFunc : controller . onResourceAdded , UpdateFunc : controller . onResourceUpdated , DeleteFunc : controller . onResourceDeleted , } , cache . Indexers { } ) controller . indexer = indexer controller . informer = informer controller . queue = queue return controller }
NewMonitorController implements a controller to monitor ingresses and routes
NewMonitorController implements a controller to monitor ingresses and routes
// Create the Ingress Watcher