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 committed Aug 10, 2020
1 parent 367ab51 commit 2ea411b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 2ea411b

Please sign in to comment.