mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
kube-controller-manager: add stopCh plumbing
This commit is contained in:
parent
6e08dd2293
commit
8686feea6d
@ -96,7 +96,7 @@ controller, and serviceaccounts controller.`,
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := Run(c.Complete()); err != nil {
|
if err := Run(c.Complete(), wait.NeverStop); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ func ResyncPeriod(c *config.CompletedConfig) func() time.Duration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Run runs the KubeControllerManagerOptions. This should never exit.
|
// Run runs the KubeControllerManagerOptions. This should never exit.
|
||||||
func Run(c *config.CompletedConfig) error {
|
func Run(c *config.CompletedConfig, stopCh <-chan struct{}) error {
|
||||||
// To help debugging, immediately log version
|
// To help debugging, immediately log version
|
||||||
glog.Infof("Version: %+v", version.Get())
|
glog.Infof("Version: %+v", version.Get())
|
||||||
|
|
||||||
@ -129,7 +129,6 @@ func Run(c *config.CompletedConfig) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start the controller manager HTTP server
|
// Start the controller manager HTTP server
|
||||||
stopCh := make(chan struct{})
|
|
||||||
if c.SecureServing != nil {
|
if c.SecureServing != nil {
|
||||||
handler := genericcontrollermanager.NewBaseHandler(&c.ComponentConfig.Debugging)
|
handler := genericcontrollermanager.NewBaseHandler(&c.ComponentConfig.Debugging)
|
||||||
handler = genericcontrollermanager.BuildHandlerChain(handler, &c.Authorization, &c.Authentication)
|
handler = genericcontrollermanager.BuildHandlerChain(handler, &c.Authorization, &c.Authentication)
|
||||||
|
Loading…
Reference in New Issue
Block a user