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
5d084758
Commit
5d084758
authored
Jan 18, 2018
by
David Eads
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle scheduler without exposed ports
parent
de694a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
server.go
cmd/kube-scheduler/app/server.go
+9
-5
No files found.
cmd/kube-scheduler/app/server.go
View file @
5d084758
...
...
@@ -194,6 +194,7 @@ func (o *Options) applyDeprecatedHealthzAddressToConfig() {
func
(
o
*
Options
)
applyDeprecatedHealthzPortToConfig
()
{
if
o
.
healthzPort
==
-
1
{
o
.
config
.
HealthzBindAddress
=
""
o
.
config
.
MetricsBindAddress
=
""
return
}
...
...
@@ -374,10 +375,13 @@ func NewSchedulerServer(config *componentconfig.KubeSchedulerConfiguration, mast
}
// Configz registration.
if
c
,
err
:=
configz
.
New
(
"componentconfig"
);
err
==
nil
{
c
.
Set
(
config
)
}
else
{
return
nil
,
fmt
.
Errorf
(
"unable to register configz: %s"
,
err
)
// only register if we're actually exposing it somewhere
if
len
(
config
.
MetricsBindAddress
)
>
0
||
len
(
config
.
HealthzBindAddress
)
>
0
{
if
c
,
err
:=
configz
.
New
(
"componentconfig"
);
err
==
nil
{
c
.
Set
(
config
)
}
else
{
return
nil
,
fmt
.
Errorf
(
"unable to register configz: %s"
,
err
)
}
}
// Prepare some Kube clients.
...
...
@@ -402,7 +406,7 @@ func NewSchedulerServer(config *componentconfig.KubeSchedulerConfiguration, mast
// Prepare a healthz server. If the metrics bind address is the same as the
// healthz bind address, consolidate the servers into one.
var
healthzServer
*
http
.
Server
if
len
(
config
.
HealthzBindAddress
)
!=
0
{
if
len
(
config
.
HealthzBindAddress
)
>
0
{
healthzServer
=
makeHealthzServer
(
config
)
}
...
...
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