fmt.Printf("[upgrade/config] In order to upgrade, a ConfigMap called %q in the %s namespace must exist.\n",constants.InitConfigurationConfigMap,metav1.NamespaceSystem)
fmt.Printf("[upgrade/config] In order to upgrade, a ConfigMap called %q in the %s namespace must exist.\n",constants.KubeadmConfigConfigMap,metav1.NamespaceSystem)
fmt.Println("[upgrade/config] Without this information, 'kubeadm upgrade' won't know how to configure your upgraded cluster.")
fmt.Printf("\t- OPTION 2: Run 'kubeadm config upload from-file' and specify the same config file you passed to 'kubeadm init' when you created your master.\n")
fmt.Printf("\t- OPTION 3: Pass a config file to 'kubeadm upgrade' using the --config flag.\n")
fmt.Println("")
err=fmt.Errorf("the ConfigMap %q in the %s namespace used for getting configuration information was not found",constants.InitConfigurationConfigMap,metav1.NamespaceSystem)
err=fmt.Errorf("the ConfigMap %q in the %s namespace used for getting configuration information was not found",constants.KubeadmConfigConfigMap,metav1.NamespaceSystem)
fmt.Printf("[uploadconfig] storing the configuration used in ConfigMap %q in the %q Namespace\n",kubeadmconstants.InitConfigurationConfigMap,metav1.NamespaceSystem)
fmt.Printf("[uploadconfig] storing the configuration used in ConfigMap %q in the %q Namespace\n",kubeadmconstants.KubeadmConfigConfigMap,metav1.NamespaceSystem)
// Prepare the ClusterConfiguration for upload
// The components store their config in their own ConfigMaps, then reset the .ComponentConfig struct;
fmt.Fprintf(w,"[%s] Reading configuration from the cluster...\n",logPrefix)
fmt.Fprintf(w,"[%s] FYI: You can look at this config file with 'kubectl -n %s get cm %s -oyaml'\n",logPrefix,metav1.NamespaceSystem,constants.InitConfigurationConfigMap)
fmt.Fprintf(w,"[%s] FYI: You can look at this config file with 'kubectl -n %s get cm %s -oyaml'\n",logPrefix,metav1.NamespaceSystem,constants.KubeadmConfigConfigMap)
name:"valid - new control plane == false",// InitConfiguration composed with data from different places, with also node specific information from ClusterStatus and node
configMaps:[]fakeConfigMap{
{
name:kubeadmconstants.InitConfigurationConfigMap,// ClusterConfiguration from kubeadm-config.
name:kubeadmconstants.KubeadmConfigConfigMap,// ClusterConfiguration from kubeadm-config.