Skip to content

Commit

Permalink
Bug 1508061: Fix panic when accessing controller args
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Nov 1, 2017
1 parent eec9d69 commit 3b3a5d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/cmd/server/start/start_kube_controller_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ func kubeControllerManagerAddFlags(cmserver *controlleroptions.CMServer) func(fl
}
}

func newKubeControllerManager(kubeconfigFile, saPrivateKeyFile, saRootCAFile, podEvictionTimeout, recyclerImage string, dynamicProvisioningEnabled bool, cmdLineArgs map[string][]string) (*controlleroptions.CMServer, []func(), error) {
if cmdLineArgs == nil {
cmdLineArgs = map[string][]string{}
func newKubeControllerManager(kubeconfigFile, saPrivateKeyFile, saRootCAFile, podEvictionTimeout, recyclerImage string, dynamicProvisioningEnabled bool, controllerArgs map[string][]string) (*controlleroptions.CMServer, []func(), error) {
cmdLineArgs := map[string][]string{}
// deep-copy the input args to avoid mutation conflict.
for k, v := range controllerArgs {
cmdLineArgs[k] = v
}
cleanupFunctions := []func(){}

Expand Down

0 comments on commit 3b3a5d6

Please sign in to comment.