mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #65866 from sttts/sttts-ctrl-manager-stopch
Automatic merge from submit-queue (batch tested with PRs 64511, 65865, 65867, 65866). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kube-controller-manager: add stopCh plumbing Needed for integration testing.
This commit is contained in:
commit
43b59986f4
@ -96,7 +96,7 @@ controller, and serviceaccounts controller.`,
|
||||
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)
|
||||
os.Exit(1)
|
||||
}
|
||||
@ -118,7 +118,7 @@ func ResyncPeriod(c *config.CompletedConfig) func() time.Duration {
|
||||
}
|
||||
|
||||
// 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
|
||||
glog.Infof("Version: %+v", version.Get())
|
||||
|
||||
@ -129,7 +129,6 @@ func Run(c *config.CompletedConfig) error {
|
||||
}
|
||||
|
||||
// Start the controller manager HTTP server
|
||||
stopCh := make(chan struct{})
|
||||
if c.SecureServing != nil {
|
||||
handler := genericcontrollermanager.NewBaseHandler(&c.ComponentConfig.Debugging)
|
||||
handler = genericcontrollermanager.BuildHandlerChain(handler, &c.Authorization, &c.Authentication)
|
||||
|
Loading…
Reference in New Issue
Block a user