// KubernetesVersion is not used, but we set it explicitly to avoid the lookup
// of the version from the internet when executing ConfigFileAndDefaultsToInternalConfig
err:=SetKubernetesVersion(client,cfg)
iferr!=nil{
returnerr
}
// 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
// runCmdFunc 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
err:=SetKubernetesVersion(nil,cfg)
kubeadmutil.CheckErr(err)
}
// 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
// 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
// KubernetesVersion is not used, but we set it explicitly to avoid the lookup
// of the version from the internet when executing ConfigFileAndDefaultsToInternalConfig
err=SetKubernetesVersion(client,cfg)
kubeadmutil.CheckErr(err)
// 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
// 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
// KubernetesVersion is not used, but we set it explicitly to avoid the lookup
// of the version from the internet when executing ConfigFileAndDefaultsToInternalConfig
err=SetKubernetesVersion(client,cfg)
kubeadmutil.CheckErr(err)
// 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
// 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
err:=SetKubernetesVersion(nil,cfg)
kubeadmutil.CheckErr(err)
}
// 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
// KubernetesVersion is not used, but we set it explicitly to avoid the lookup
// of the version from the internet when executing ConfigFileAndDefaultsToInternalConfig
err:=phaseutil.SetKubernetesVersion(client,cfg)
iferr!=nil{
returnerr
}
// 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