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
4d155cf7
Commit
4d155cf7
authored
Apr 09, 2018
by
Lei Gong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some shadow declaration in cmd package
Signed-off-by:
Lei Gong
<
lgong@alauda.io
>
parent
56482005
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
server.go
cmd/kube-scheduler/app/server.go
+11
-11
No files found.
cmd/kube-scheduler/app/server.go
View file @
4d155cf7
...
@@ -482,38 +482,38 @@ func makeLeaderElectionConfig(config componentconfig.KubeSchedulerLeaderElection
...
@@ -482,38 +482,38 @@ func makeLeaderElectionConfig(config componentconfig.KubeSchedulerLeaderElection
// embed the metrics handler if the healthz and metrics address configurations
// embed the metrics handler if the healthz and metrics address configurations
// are the same.
// are the same.
func
makeHealthzServer
(
config
*
componentconfig
.
KubeSchedulerConfiguration
)
*
http
.
Server
{
func
makeHealthzServer
(
config
*
componentconfig
.
KubeSchedulerConfiguration
)
*
http
.
Server
{
m
ux
:=
mux
.
NewPathRecorderMux
(
"kube-scheduler"
)
pathRecorderM
ux
:=
mux
.
NewPathRecorderMux
(
"kube-scheduler"
)
healthz
.
InstallHandler
(
m
ux
)
healthz
.
InstallHandler
(
pathRecorderM
ux
)
if
config
.
HealthzBindAddress
==
config
.
MetricsBindAddress
{
if
config
.
HealthzBindAddress
==
config
.
MetricsBindAddress
{
configz
.
InstallHandler
(
m
ux
)
configz
.
InstallHandler
(
pathRecorderM
ux
)
m
ux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
pathRecorderM
ux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
}
}
if
config
.
EnableProfiling
{
if
config
.
EnableProfiling
{
routes
.
Profiling
{}
.
Install
(
m
ux
)
routes
.
Profiling
{}
.
Install
(
pathRecorderM
ux
)
if
config
.
EnableContentionProfiling
{
if
config
.
EnableContentionProfiling
{
goruntime
.
SetBlockProfileRate
(
1
)
goruntime
.
SetBlockProfileRate
(
1
)
}
}
}
}
return
&
http
.
Server
{
return
&
http
.
Server
{
Addr
:
config
.
HealthzBindAddress
,
Addr
:
config
.
HealthzBindAddress
,
Handler
:
m
ux
,
Handler
:
pathRecorderM
ux
,
}
}
}
}
// makeMetricsServer builds a metrics server from the config.
// makeMetricsServer builds a metrics server from the config.
func
makeMetricsServer
(
config
*
componentconfig
.
KubeSchedulerConfiguration
)
*
http
.
Server
{
func
makeMetricsServer
(
config
*
componentconfig
.
KubeSchedulerConfiguration
)
*
http
.
Server
{
m
ux
:=
mux
.
NewPathRecorderMux
(
"kube-scheduler"
)
pathRecorderM
ux
:=
mux
.
NewPathRecorderMux
(
"kube-scheduler"
)
configz
.
InstallHandler
(
m
ux
)
configz
.
InstallHandler
(
pathRecorderM
ux
)
m
ux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
pathRecorderM
ux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
if
config
.
EnableProfiling
{
if
config
.
EnableProfiling
{
routes
.
Profiling
{}
.
Install
(
m
ux
)
routes
.
Profiling
{}
.
Install
(
pathRecorderM
ux
)
if
config
.
EnableContentionProfiling
{
if
config
.
EnableContentionProfiling
{
goruntime
.
SetBlockProfileRate
(
1
)
goruntime
.
SetBlockProfileRate
(
1
)
}
}
}
}
return
&
http
.
Server
{
return
&
http
.
Server
{
Addr
:
config
.
MetricsBindAddress
,
Addr
:
config
.
MetricsBindAddress
,
Handler
:
m
ux
,
Handler
:
pathRecorderM
ux
,
}
}
}
}
...
...
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