// runCmdPhase creates a cobra.Command Run function, by composing the call to the given cmdFunc with necessary additional steps (e.g preparation of input parameters)
// If we wouldn't set this to something, the code would dynamically look up the version from the internet
// By setting this explicitly for tests workarounds that
ifdefaultKubernetesVersion!=""{
cfg.KubernetesVersion=defaultKubernetesVersion
}else{
// KubernetesVersion is not used, but we set it explicitly to avoid the lookup
// of the version from the internet when executing ConfigFileAndDefaultsToInternalConfig
SetKubernetesVersion(cfg)
}
// This call returns the ready-to-use configuration based on the configuration file that might or might not exist and the default cfg populated by flags