Migrate missed log entries in kubelet

Co-Authored-By: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
Elana Hashman
2021-03-17 14:48:16 -07:00
parent 3aa1c58342
commit 6af7eb6d49
14 changed files with 31 additions and 36 deletions

View File

@@ -52,7 +52,7 @@ func initForOS(windowsService bool, windowsPriorityClass string) error {
}
kubeletProcessHandle := windows.CurrentProcess()
// Set the priority of the kubelet process to given priority
klog.Infof("Setting the priority of kubelet process to %s", windowsPriorityClass)
klog.InfoS("Setting the priority of kubelet process", "windowsPriorityClass", windowsPriorityClass)
if err := windows.SetPriorityClass(kubeletProcessHandle, priority); err != nil {
return err
}

View File

@@ -52,7 +52,7 @@ func appendPluginBasedOnFeatureFlags(plugins []volume.VolumePlugin, inTreePlugin
return plugins, nil
}
if featureGate.Enabled(pluginInfo.pluginUnregisterFeature) {
klog.Infof("Skipped registration of plugin since feature flag is enabled", "pluginName", inTreePluginName, "featureFlag", pluginInfo.pluginUnregisterFeature)
klog.InfoS("Skipped registration of plugin since feature flag is enabled", "pluginName", inTreePluginName, "featureFlag", pluginInfo.pluginUnregisterFeature)
return plugins, nil
}

View File

@@ -285,10 +285,9 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
config.StaticPodURLHeader[k] = []string{"<masked>"}
}
// log the kubelet's config for inspection
klog.V(5).Infof("KubeletConfiguration: %#v", config)
klog.V(5).InfoS("KubeletConfiguration", "configuration", kubeletServer.KubeletConfiguration)
// run the kubelet
klog.V(5).InfoS("KubeletConfiguration", "configuration", kubeletServer.KubeletConfiguration)
if err := Run(ctx, kubeletServer, kubeletDeps, utilfeature.DefaultFeatureGate); err != nil {
klog.ErrorS(err, "Failed to run kubelet")
os.Exit(1)