mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-01 17:29:00 +00:00
kubelet: print flags after initializing logging
If done too soon, the klog.V() calls are ignored because the log verbosity isn't set. In Kubernetes 1.22, the verbosity was set, but not the logging format.
This commit is contained in:
@@ -181,7 +181,6 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
|
||||
|
||||
// short-circuit on verflag
|
||||
verflag.PrintAndExitIfRequested()
|
||||
cliflag.PrintFlags(cleanFlagSet)
|
||||
|
||||
// set feature gates from initial flags-based config
|
||||
if err := utilfeature.DefaultMutableFeatureGate.SetFromMap(kubeletConfig.FeatureGates); err != nil {
|
||||
@@ -266,6 +265,7 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
|
||||
klog.ErrorS(err, "Failed to initialize logging")
|
||||
os.Exit(1)
|
||||
}
|
||||
cliflag.PrintFlags(cleanFlagSet)
|
||||
|
||||
// construct a KubeletServer from kubeletFlags and kubeletConfig
|
||||
kubeletServer := &options.KubeletServer{
|
||||
|
Reference in New Issue
Block a user