// WithCSIDriverController returns a *ControllerSet with a CSI Driver controller initialized.
WithCSIDriverController returns a *ControllerSet with a CSI Driver controller initialized.
// WithCSIDriverController returns a * ControllerSet with a CSI Driver controller initialized .
func (c *CSIControllerSet) WithCSIDriverController(
	name string,
	configName string,
	csiDriverName string,
	csiDriverNamespace string,
	assetFunc func(string) []byte,
	kubeClient kubernetes.Interface,
	namespacedInformerFactory informers.SharedInformerFactory,
	setters ...CSIDriverControllerOption,
) *CSIControllerSet {
	cdc := csidrivercontroller.NewCSIDriverController(
		name,
		csiDriverName,
		csiDriverNamespace,
		configName,
		c.operatorClient,
		assetFunc,
		kubeClient,
		c.eventRecorder,
	)
	opts := &CSIDriverControllerOptions{}
	for _, setter := range setters {
		setter(opts)
	}
	if opts.controllerManifest != "" {
		cdc = cdc.WithControllerService(namespacedInformerFactory.Apps().V1().Deployments(), opts.controllerManifest)
	}
	if opts.nodeManifest != "" {
		cdc = cdc.WithNodeService(namespacedInformerFactory.Apps().V1().DaemonSets(), opts.nodeManifest)
	}
	c.csiDriverController = cdc
	return c
}
func ( c * CSIControllerSet ) WithCSIDriverController ( name string , configName string , csiDriverName string , csiDriverNamespace string , assetFunc func ( string ) [ ] byte , kubeClient kubernetes . Interface , namespacedInformerFactory informers . SharedInformerFactory , setters ... CSIDriverControllerOption , ) * CSIControllerSet { cdc := csidrivercontroller . NewCSIDriverController ( name , csiDriverName , csiDriverNamespace , configName , c . operatorClient , assetFunc , kubeClient , c . eventRecorder , ) opts := & CSIDriverControllerOptions { } for _ , setter := range setters { setter ( opts ) } if opts . controllerManifest != " " { cdc = cdc . WithControllerService ( namespacedInformerFactory . Apps ( ) . V1 ( ) . Deployments ( ) , opts . controllerManifest ) } if opts . nodeManifest != " " { cdc = cdc . WithNodeService ( namespacedInformerFactory . Apps ( ) . V1 ( ) . DaemonSets ( ) , opts . nodeManifest ) } c . csiDriverController = cdc return c }
WithCSIDriverController returns a *ControllerSet with a CSI Driver controller initialized.
WithCSIDriverController returns a * ControllerSet with a CSI Driver controller initialized .