// NewCSIDriverController returns a new CSIDriverController without any CSI Service.
// It's expected that the CSI Services are added to the controller using the
// appropriate With*Service functions.
NewCSIDriverController returns a new CSIDriverController without any CSI Service.
It's expected that the CSI Services are added to the controller using the
appropriate With*Service functions.
// NewCSIDriverController returns a new CSIDriverController without any CSI Service . // It ' s expected that the CSI Services are added to the controller using the // appropriate With * Service functions .
func NewCSIDriverController(
	name string,
	csiDriverName string,
	csiDriverNamespace string,
	instanceName string,
	operatorClient v1helpers.OperatorClient,
	assetFunc func(string) []byte,
	kubeClient kubernetes.Interface,
	eventRecorder events.Recorder,
) *CSIDriverController {
	c := &CSIDriverController{
		name:               name,
		csiDriverName:      csiDriverName,
		csiDriverNamespace: csiDriverNamespace,
		kubeClient:         kubeClient,
		configName:         instanceName,
		operatorClient:     operatorClient,
		assetFunc:          assetFunc,
		images:             imagesFromEnv(),
		queue:              workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), csiDriverName),
		eventRecorder:      eventRecorder.WithComponentSuffix("csi-driver-controller-recorder-" + strings.ToLower(name)),
	}
	operatorClient.Informer().AddEventHandler(c.eventHandler(csiDriverName))
	c.informersSynced = append(c.informersSynced, operatorClient.Informer().HasSynced)
	return c
}
func NewCSIDriverController ( name string , csiDriverName string , csiDriverNamespace string , instanceName string , operatorClient v1helpers . OperatorClient , assetFunc func ( string ) [ ] byte , kubeClient kubernetes . Interface , eventRecorder events . Recorder , ) * CSIDriverController { c := & CSIDriverController { name : name , csiDriverName : csiDriverName , csiDriverNamespace : csiDriverNamespace , kubeClient : kubeClient , configName : instanceName , operatorClient : operatorClient , assetFunc : assetFunc , images : imagesFromEnv ( ) , queue : workqueue . NewNamedRateLimitingQueue ( workqueue . DefaultControllerRateLimiter ( ) , csiDriverName ) , eventRecorder : eventRecorder . WithComponentSuffix ( " " + strings . ToLower ( name ) ) , } operatorClient . Informer ( ) . AddEventHandler ( c . eventHandler ( csiDriverName ) ) c . informersSynced = append ( c . informersSynced , operatorClient . Informer ( ) . HasSynced ) return c }
NewCSIDriverController returns a new CSIDriverController without any CSI Service.
NewCSIDriverController returns a new CSIDriverController without any CSI Service .