Skip to content

Commit

Permalink
Rename context
Browse files Browse the repository at this point in the history
  • Loading branch information
ash2k committed Jun 9, 2018
1 parent 102090d commit e458cfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/kube-controller-manager/app/controllermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func Run(c *config.CompletedConfig) error {
}
}

run := func(runCtx context.Context) {
run := func(ctx context.Context) {
rootClientBuilder := controller.SimpleControllerClientBuilder{
ClientConfig: c.Kubeconfig,
}
Expand All @@ -165,18 +165,18 @@ func Run(c *config.CompletedConfig) error {
} else {
clientBuilder = rootClientBuilder
}
ctx, err := CreateControllerContext(c, rootClientBuilder, clientBuilder, runCtx.Done())
controllerContext, err := CreateControllerContext(c, rootClientBuilder, clientBuilder, ctx.Done())
if err != nil {
glog.Fatalf("error building controller context: %v", err)
}
saTokenControllerInitFunc := serviceAccountTokenControllerStarter{rootClientBuilder: rootClientBuilder}.startServiceAccountTokenController

if err := StartControllers(ctx, saTokenControllerInitFunc, NewControllerInitializers(ctx.LoopMode)); err != nil {
if err := StartControllers(controllerContext, saTokenControllerInitFunc, NewControllerInitializers(controllerContext.LoopMode)); err != nil {
glog.Fatalf("error starting controllers: %v", err)
}

ctx.InformerFactory.Start(ctx.Stop)
close(ctx.InformersStarted)
controllerContext.InformerFactory.Start(controllerContext.Stop)
close(controllerContext.InformersStarted)

select {}
}
Expand Down

0 comments on commit e458cfe

Please sign in to comment.