Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract ParseCIDR and modify attachDetachControllerName #43736

Merged
merged 1 commit into from
Apr 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions cmd/kube-controller-manager/app/controllermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func KnownControllers() []string {
serviceControllerName,
routeControllerName,
pvBinderControllerName,
attachDetatchControllerName,
attachDetachControllerName,
)

// add "special" controllers that aren't initialized normally
Expand Down Expand Up @@ -365,12 +365,12 @@ func getAvailableResources(clientBuilder controller.ControllerClientBuilder) (ma
}

const (
saTokenControllerName = "serviceaccount-token"
nodeControllerName = "node"
serviceControllerName = "service"
routeControllerName = "route"
pvBinderControllerName = "persistentvolume-binder"
attachDetatchControllerName = "attachdetach"
saTokenControllerName = "serviceaccount-token"
nodeControllerName = "node"
serviceControllerName = "service"
routeControllerName = "route"
pvBinderControllerName = "persistentvolume-binder"
attachDetachControllerName = "attachdetach"
)

func StartControllers(controllers map[string]InitFunc, s *options.CMServer, rootClientBuilder, clientBuilder controller.ControllerClientBuilder, stop <-chan struct{}) error {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.")
}
Expand All @@ -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)
Expand Down