Add version and flag info to apiserver and CM logs.

Should help debugging.
Specifically for #45706
This commit is contained in:
Matt Liggett
2017-06-01 14:30:34 -07:00
parent 88add574fd
commit f6bcac3fec
3 changed files with 10 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ import (
serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount"
"k8s.io/kubernetes/pkg/serviceaccount"
"k8s.io/kubernetes/pkg/util/configz"
"k8s.io/kubernetes/pkg/version"
"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus"
@@ -102,6 +103,8 @@ func ResyncPeriod(s *options.CMServer) func() time.Duration {
// Run runs the CMServer. This should never exit.
func Run(s *options.CMServer) error {
// To help debugging, immediately log version
glog.Infof("Version: %+v", version.Get())
if err := s.Validate(KnownControllers(), ControllersDisabledByDefault.List()); err != nil {
return err
}