// 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 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
// 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
// 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
fmt.Printf("[upgrade/config] In order to upgrade, a ConfigMap called %q in the %s namespace must exist.\n",constants.KubeadmConfigConfigMap,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)
// FetchConfigFromFileOrCluster fetches configuration required for upgrading your cluster from a file (which has precedence) or a ConfigMap in the cluster
// FetchInitConfigurationFromCluster fetches configuration from a ConfigMap in the cluster
fmt.Fprintf(w,"[%s] Reading configuration options from a file: %s\n",logPrefix,cfgPath)
returnloadInitConfigurationFromFile(cfgPath)
}
fmt.Fprintf(w,"[%s] Reading configuration from the cluster...\n",logPrefix)
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.KubeadmConfigConfigMap)
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)
// Takes passed flags into account; the defaulting is executed once again enforcing assignment of
}
// static default values to cfg only for values not provided with flags
kubeadmscheme.Scheme.Default(defaultversionedcfg)
// LoadInitConfigurationFromFile loads a supported versioned InitConfiguration from a file, converts it into internal config, defaults it and verifies it.
// These tests are reading one file, loading it using ConfigFileAndDefaultsToInternalConfig that all of kubeadm is using for unmarshal of our API types,
// These tests are reading one file, loading it using LoadInitConfigurationFromFile that all of kubeadm is using for unmarshal of our API types,
// and then marshals the internal object to the expected groupVersion
// and then marshals the internal object to the expected groupVersion