mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-21 14:38:46 +00:00
kubeadm: update output of init, join reset commands
- move most unrelated to phases output to klog.V(1) - rename some prefixes for consistency - e.g. [kubelet] -> [kubelet-start] - control-plane-prepare: print details for each generated CP component manifest. - uppercase the info text for all "[reset].." lines - modify the text for one line in reset
This commit is contained in:
@@ -57,7 +57,7 @@ func CreatePKIAssets(cfg *kubeadmapi.InitConfiguration) error {
|
||||
return errors.Wrap(err, "error creating PKI assets")
|
||||
}
|
||||
|
||||
fmt.Printf("[certs] valid certificates and keys now exist in %q\n", cfg.CertificatesDir)
|
||||
fmt.Printf("[certs] Valid certificates and keys now exist in %q\n", cfg.CertificatesDir)
|
||||
|
||||
// Service accounts are not x509 certs, so handled separately
|
||||
return CreateServiceAccountKeyAndPublicKeyFiles(cfg.CertificatesDir)
|
||||
|
@@ -63,7 +63,7 @@ func CreateLocalEtcdStaticPodManifestFile(manifestDir string, nodeName string, c
|
||||
|
||||
// CheckLocalEtcdClusterStatus verifies health state of local/stacked etcd cluster before installing a new etcd member
|
||||
func CheckLocalEtcdClusterStatus(client clientset.Interface, cfg *kubeadmapi.ClusterConfiguration) error {
|
||||
fmt.Println("[etcd] Checking etcd cluster health")
|
||||
klog.V(1).Info("[etcd] Checking etcd cluster health")
|
||||
|
||||
// creates an etcd client that connects to all the local/stacked etcd members
|
||||
klog.V(1).Info("creating etcd client that connects to etcd pods")
|
||||
|
@@ -127,7 +127,7 @@ func DownloadConfig(client clientset.Interface, kubeletVersion *version.Version,
|
||||
// Download the ConfigMap from the cluster based on what version the kubelet is
|
||||
configMapName := kubeadmconstants.GetKubeletConfigMapName(kubeletVersion)
|
||||
|
||||
fmt.Printf("[kubelet] Downloading configuration for the kubelet from the %q ConfigMap in the %s namespace\n",
|
||||
fmt.Printf("[kubelet-start] Downloading configuration for the kubelet from the %q ConfigMap in the %s namespace\n",
|
||||
configMapName, metav1.NamespaceSystem)
|
||||
|
||||
kubeletCfg, err := client.CoreV1().ConfigMaps(metav1.NamespaceSystem).Get(configMapName, metav1.GetOptions{})
|
||||
|
@@ -10,6 +10,7 @@ go_library(
|
||||
"//cmd/kubeadm/app/util/apiclient:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -17,10 +17,9 @@ limitations under the License.
|
||||
package patchnode
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app/constants"
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient"
|
||||
)
|
||||
@@ -28,7 +27,7 @@ import (
|
||||
// AnnotateCRISocket annotates the node with the given crisocket
|
||||
func AnnotateCRISocket(client clientset.Interface, nodeName string, criSocket string) error {
|
||||
|
||||
fmt.Printf("[patchnode] Uploading the CRI Socket information %q to the Node API object %q as an annotation\n", criSocket, nodeName)
|
||||
klog.V(1).Infof("[patchnode] Uploading the CRI Socket information %q to the Node API object %q as an annotation\n", criSocket, nodeName)
|
||||
|
||||
return apiclient.PatchNode(client, nodeName, func(n *v1.Node) {
|
||||
annotateNodeWithCRISocket(n, criSocket)
|
||||
|
@@ -39,7 +39,7 @@ const (
|
||||
|
||||
// UploadConfiguration saves the InitConfiguration used for later reference (when upgrading for instance)
|
||||
func UploadConfiguration(cfg *kubeadmapi.InitConfiguration, client clientset.Interface) error {
|
||||
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;
|
||||
|
Reference in New Issue
Block a user