Skip to content

Commit

Permalink
fix(manager): disable metrics server from controller runtime
Browse files Browse the repository at this point in the history
latest controller runtime started a metrics server at port 8080
by default. This caused NDM to crash on systems where the port was
already in use.

Signed-off-by: Akhil Mohan <[email protected]>
  • Loading branch information
akhilerm authored and kmova committed Aug 11, 2020
1 parent dc29f7c commit 07dc984
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/473-akhilerm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable metrics server of controller runtime by default.
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func main() {
reconInterval := ReconciliationInterval

// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{Namespace: namespace, SyncPeriod: &reconInterval})
mgr, err := manager.New(cfg, manager.Options{Namespace: namespace, SyncPeriod: &reconInterval, MetricsBindAddress: "0"})
if err != nil {
klog.Errorf("Failed to create a new manager: %v", err)
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func NewController() (*Controller, error) {
}
controller.Namespace = ns

mgr, err := manager.New(controller.config, manager.Options{Namespace: controller.Namespace})
mgr, err := manager.New(controller.config, manager.Options{Namespace: controller.Namespace, MetricsBindAddress: "0"})
if err != nil {
return controller, err
}
Expand Down

0 comments on commit 07dc984

Please sign in to comment.