add default for loggingconfiguration struct

This commit is contained in:
amash
2020-06-30 16:21:13 +04:30
parent 3ab25f1876
commit b92b04e7cd
6 changed files with 26 additions and 5 deletions

View File

@@ -405,9 +405,7 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea
// not be generated.
func Run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate, stopCh <-chan struct{}) error {
logOption := logs.NewOptions()
if s.Logging.Format != "" {
logOption.LogFormat = s.Logging.Format
}
logOption.LogFormat = s.Logging.Format
logOption.Apply()
// To help debugging, immediately log version
klog.Infof("Version: %+v", version.Get())