Merge pull request #47640 from xiangpengzhao/fix-bin-ver

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add version info to kube-scheduler, kube-proxy and kubelet logs.

**What this PR does / why we need it**:
#46047 add such info to apiserver and CM. This adds version info to other binaries.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: related to #46047 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-09-28 20:02:59 -07:00
committed by GitHub
5 changed files with 13 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ go_library(
"//pkg/controller:go_default_library",
"//pkg/features:go_default_library",
"//pkg/util/configz:go_default_library",
"//pkg/version:go_default_library",
"//plugin/cmd/kube-scheduler/app/options:go_default_library",
"//plugin/pkg/scheduler:go_default_library",
"//plugin/pkg/scheduler/algorithmprovider:go_default_library",

View File

@@ -34,6 +34,7 @@ import (
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/kubernetes/pkg/controller"
"k8s.io/kubernetes/pkg/util/configz"
"k8s.io/kubernetes/pkg/version"
"k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options"
_ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider"
"k8s.io/kubernetes/plugin/pkg/scheduler/factory"
@@ -66,6 +67,9 @@ through the API as necessary.`,
// Run runs the specified SchedulerServer. This should never exit.
func Run(s *options.SchedulerServer) error {
// To help debugging, immediately log version
glog.Infof("Version: %+v", version.Get())
kubecli, err := createClient(s)
if err != nil {
return fmt.Errorf("unable to create kube client: %v", err)