mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
cloud-controller-manager: add test server
This commit is contained in:
@@ -71,7 +71,7 @@ the cloud specific control loops shipped with Kubernetes.`,
|
||||
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)
|
||||
}
|
||||
@@ -100,7 +100,7 @@ the cloud specific control loops shipped with Kubernetes.`,
|
||||
}
|
||||
|
||||
// Run runs the ExternalCMServer. This should never exit.
|
||||
func Run(c *cloudcontrollerconfig.CompletedConfig) error {
|
||||
func Run(c *cloudcontrollerconfig.CompletedConfig, stopCh <-chan struct{}) error {
|
||||
cloud, err := cloudprovider.InitCloudProvider(c.ComponentConfig.CloudProvider.Name, c.ComponentConfig.CloudProvider.CloudConfigFile)
|
||||
if err != nil {
|
||||
glog.Fatalf("Cloud provider could not be initialized: %v", err)
|
||||
@@ -125,7 +125,6 @@ func Run(c *cloudcontrollerconfig.CompletedConfig) error {
|
||||
}
|
||||
|
||||
// Start the controller manager HTTP server
|
||||
stopCh := make(chan struct{})
|
||||
if c.SecureServing != nil {
|
||||
unsecuredMux := genericcontrollermanager.NewBaseHandler(&c.ComponentConfig.Debugging)
|
||||
handler := genericcontrollermanager.BuildHandlerChain(unsecuredMux, &c.Authorization, &c.Authentication)
|
||||
|
||||
Reference in New Issue
Block a user