mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #43736 from NickrenREN/cm-extrac
Automatic merge from submit-queue (batch tested with PRs 43870, 30302, 42722, 43736) Extract ParseCIDR and modify attachDetachControllerName **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -280,7 +280,7 @@ func KnownControllers() []string {
 | 
			
		||||
		serviceControllerName,
 | 
			
		||||
		routeControllerName,
 | 
			
		||||
		pvBinderControllerName,
 | 
			
		||||
		attachDetatchControllerName,
 | 
			
		||||
		attachDetachControllerName,
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
	// add "special" controllers that aren't initialized normally
 | 
			
		||||
@@ -370,7 +370,7 @@ const (
 | 
			
		||||
	serviceControllerName      = "service"
 | 
			
		||||
	routeControllerName        = "route"
 | 
			
		||||
	pvBinderControllerName     = "persistentvolume-binder"
 | 
			
		||||
	attachDetatchControllerName = "attachdetach"
 | 
			
		||||
	attachDetachControllerName = "attachdetach"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func StartControllers(controllers map[string]InitFunc, s *options.CMServer, rootClientBuilder, clientBuilder controller.ControllerClientBuilder, stop <-chan struct{}) error {
 | 
			
		||||
@@ -444,7 +444,7 @@ func StartControllers(controllers map[string]InitFunc, s *options.CMServer, root
 | 
			
		||||
		glog.Infof("Started %q", controllerName)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// all the remaning plugins want this cloud variable
 | 
			
		||||
	// all the remaining plugins want this cloud variable
 | 
			
		||||
	cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("cloud provider could not be initialized: %v", err)
 | 
			
		||||
@@ -553,7 +553,7 @@ func StartControllers(controllers map[string]InitFunc, s *options.CMServer, root
 | 
			
		||||
		glog.Warningf("%q is disabled", pvBinderControllerName)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ctx.IsControllerEnabled(attachDetatchControllerName) {
 | 
			
		||||
	if ctx.IsControllerEnabled(attachDetachControllerName) {
 | 
			
		||||
		if s.ReconcilerSyncLoopPeriod.Duration < time.Second {
 | 
			
		||||
			return fmt.Errorf("Duration time must be greater than one second as set via command line option reconcile-sync-loop-period.")
 | 
			
		||||
		}
 | 
			
		||||
@@ -575,7 +575,7 @@ func StartControllers(controllers map[string]InitFunc, s *options.CMServer, root
 | 
			
		||||
		go attachDetachController.Run(stop)
 | 
			
		||||
		time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter))
 | 
			
		||||
	} else {
 | 
			
		||||
		glog.Warningf("%q is disabled", attachDetatchControllerName)
 | 
			
		||||
		glog.Warningf("%q is disabled", attachDetachControllerName)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	sharedInformers.Start(stop)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user