Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f6bcac3f
Commit
f6bcac3f
authored
Jun 01, 2017
by
Matt Liggett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add version and flag info to apiserver and CM logs.
Should help debugging. Specifically for #45706
parent
88add574
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
server.go
cmd/kube-apiserver/app/server.go
+3
-0
controllermanager.go
cmd/kube-controller-manager/app/controllermanager.go
+3
-0
flags.go
staging/src/k8s.io/apiserver/pkg/util/flag/flags.go
+4
-1
No files found.
cmd/kube-apiserver/app/server.go
View file @
f6bcac3f
...
...
@@ -104,6 +104,9 @@ cluster's shared state through which all other components interact.`,
// Run runs the specified APIServer. This should never exit.
func
Run
(
runOptions
*
options
.
ServerRunOptions
,
stopCh
<-
chan
struct
{})
error
{
// To help debugging, immediately log version
glog
.
Infof
(
"Version: %+v"
,
version
.
Get
())
nodeTunneler
,
proxyTransport
,
err
:=
CreateNodeDialer
(
runOptions
)
if
err
!=
nil
{
return
err
...
...
cmd/kube-controller-manager/app/controllermanager.go
View file @
f6bcac3f
...
...
@@ -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
}
...
...
staging/src/k8s.io/apiserver/pkg/util/flag/flags.go
View file @
f6bcac3f
...
...
@@ -43,9 +43,12 @@ func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedNam
return
pflag
.
NormalizedName
(
name
)
}
// InitFlags normalizes
and parse
s the command line flags
// InitFlags normalizes
, parses, then log
s the command line flags
func
InitFlags
()
{
pflag
.
CommandLine
.
SetNormalizeFunc
(
WordSepNormalizeFunc
)
pflag
.
CommandLine
.
AddGoFlagSet
(
goflag
.
CommandLine
)
pflag
.
Parse
()
pflag
.
VisitAll
(
func
(
flag
*
pflag
.
Flag
)
{
glog
.
Infof
(
"FLAG: --%s=%q"
,
flag
.
Name
,
flag
.
Value
)
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment