Address review comments

This commit is contained in:
cici37 2021-02-18 14:45:44 -08:00
parent 9849079d4e
commit 781d7cf134
2 changed files with 2 additions and 2 deletions

View File

@ -64,6 +64,7 @@ const (
)
// NewCloudControllerManagerCommand creates a *cobra.Command object with default parameters
// initFuncConstructor is a map of named controller groups (you can start more than one in an init func) paired to their InitFuncConstructor.
func NewCloudControllerManagerCommand(s *options.CloudControllerManagerOptions, cloudInitializer InitCloudFunc, initFuncConstructor map[string]InitFuncConstructor, stopCh <-chan struct{}) *cobra.Command {
cmd := &cobra.Command{

View File

@ -63,7 +63,7 @@ type Logger interface {
// enough time to remove temporary files.
func StartTestServer(t Logger, customFlags []string) (result TestServer, err error) {
stopCh := make(chan struct{})
configDoneCh := make(chan string)
configDoneCh := make(chan struct{})
var capturedConfig config.CompletedConfig
tearDown := func() {
close(stopCh)
@ -90,7 +90,6 @@ func StartTestServer(t Logger, customFlags []string) (result TestServer, err err
cloudInitializer := func(config *config.CompletedConfig) cloudprovider.Interface {
capturedConfig = *config
// send signal to indicate the capturedConfig has been properly set
configDoneCh <- ""
close(configDoneCh)
cloudConfig := config.ComponentConfig.KubeCloudShared.CloudProvider
cloud, err := cloudprovider.InitCloudProvider(cloudConfig.Name, cloudConfig.CloudConfigFile)