diff --git a/changelogs/unreleased/473-akhilerm b/changelogs/unreleased/473-akhilerm new file mode 100644 index 000000000..5c8e096c4 --- /dev/null +++ b/changelogs/unreleased/473-akhilerm @@ -0,0 +1 @@ +disable metrics server of controller runtime by default. \ No newline at end of file diff --git a/cmd/manager/main.go b/cmd/manager/main.go index bb5147b2b..0f6cdaa3d 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -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) diff --git a/cmd/ndm_daemonset/controller/controller.go b/cmd/ndm_daemonset/controller/controller.go index 2f7f329f7..9837ea77e 100644 --- a/cmd/ndm_daemonset/controller/controller.go +++ b/cmd/ndm_daemonset/controller/controller.go @@ -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 }