// If the request is unauthorized, the cluster admin has not granted access to the cluster info configmap for unauthenticated users
// In that case, trust the cluster admin and do not refresh the cluster-info credentials
fmt.Printf("[discovery] Could not access the %s ConfigMap for refreshing the cluster-info information, but the TLS cert is valid so proceeding...\n",bootstrapapi.ConfigMapClusterInfo)
klog.Warningf("[discovery] Could not access the %s ConfigMap for refreshing the cluster-info information, but the TLS cert is valid so proceeding...\n",bootstrapapi.ConfigMapClusterInfo)
returntrue,nil
}
fmt.Printf("[discovery] Failed to validate the API Server's identity, will try again: [%v]\n",err)
klog.V(1).Infof("[discovery] Failed to validate the API Server's identity, will try again: [%v]\n",err)
fmt.Printf("[discovery] The %s ConfigMap isn't set up properly (%v), but the TLS cert is valid so proceeding...\n",bootstrapapi.ConfigMapClusterInfo,err)
klog.V(1).Infof("[discovery] The %s ConfigMap isn't set up properly (%v), but the TLS cert is valid so proceeding...\n",bootstrapapi.ConfigMapClusterInfo,err)
returnkubeconfig,nil
}
fmt.Println("[discovery] Synced cluster-info information from the API Server so we have got the latest information")
klog.V(1).Infoln("[discovery] Synced cluster-info information from the API Server so we have got the latest information")
// In an HA world in the future, this will make more sense, because now we've got new information, possibly about new API Servers to talk to
fmt.Printf("[discovery] Requesting info from %q again to validate TLS against the pinned public key\n",insecureBootstrapConfig.Clusters[clusterName].Server)
klog.V(1).Infof("[discovery] Requesting info from %q again to validate TLS against the pinned public key\n",insecureBootstrapConfig.Clusters[clusterName].Server)
returnnil,errors.Wrapf(err,"couldn't parse the kubeconfig file in the %s configmap",bootstrapapi.ConfigMapClusterInfo)
}
fmt.Printf("[discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server %q\n",endpoint)
klog.V(1).Infof("[discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server %q\n",endpoint)
fmt.Printf("[uploadconfig] storing the configuration used in ConfigMap %q in the %q Namespace\n",kubeadmconstants.KubeadmConfigConfigMap,metav1.NamespaceSystem)
fmt.Printf("[upload-config] 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;