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
8b04e7f7
Commit
8b04e7f7
authored
Apr 22, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7165 from fgrzadkowski/add_metrics_handler
Add metrics handler in controller manager.
parents
b98f93bb
93573419
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
controllermanager.go
cmd/kube-controller-manager/app/controllermanager.go
+11
-2
No files found.
cmd/kube-controller-manager/app/controllermanager.go
View file @
8b04e7f7
...
...
@@ -35,6 +35,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/nodecontroller"
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/servicecontroller"
replicationControllerPkg
"github.com/GoogleCloudPlatform/kubernetes/pkg/controller"
"github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports"
"github.com/GoogleCloudPlatform/kubernetes/pkg/namespace"
"github.com/GoogleCloudPlatform/kubernetes/pkg/resourcequota"
...
...
@@ -42,6 +43,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/pflag"
)
...
...
@@ -179,13 +181,20 @@ func (s *CMServer) Run(_ []string) error {
}
go
func
()
{
mux
:=
http
.
NewServeMux
()
healthz
.
InstallHandler
(
mux
)
if
s
.
EnableProfiling
{
mux
:=
http
.
NewServeMux
()
mux
.
HandleFunc
(
"/debug/pprof/"
,
pprof
.
Index
)
mux
.
HandleFunc
(
"/debug/pprof/profile"
,
pprof
.
Profile
)
mux
.
HandleFunc
(
"/debug/pprof/symbol"
,
pprof
.
Symbol
)
}
http
.
ListenAndServe
(
net
.
JoinHostPort
(
s
.
Address
.
String
(),
strconv
.
Itoa
(
s
.
Port
)),
nil
)
mux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
server
:=
&
http
.
Server
{
Addr
:
net
.
JoinHostPort
(
s
.
Address
.
String
(),
strconv
.
Itoa
(
s
.
Port
)),
Handler
:
mux
,
}
glog
.
Fatal
(
server
.
ListenAndServe
())
}()
endpoints
:=
service
.
NewEndpointController
(
kubeClient
)
...
...
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