From 20129fa826dacb503c414af56150ae824499c123 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Tue, 11 Oct 2022 10:24:05 -0500 Subject: [PATCH] disable k8s controller-runtime manager metrics server (#492) * setting MetricsBindAddress to 0 to disable controller-runtime manager metrics server Signed-off-by: Daniel Rammer * and now in the webhook Signed-off-by: Daniel Rammer Signed-off-by: Daniel Rammer --- flytepropeller/cmd/controller/cmd/root.go | 1 + flytepropeller/cmd/controller/cmd/webhook.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/flytepropeller/cmd/controller/cmd/root.go b/flytepropeller/cmd/controller/cmd/root.go index 7b3c37fcf..2bebc269b 100644 --- a/flytepropeller/cmd/controller/cmd/root.go +++ b/flytepropeller/cmd/controller/cmd/root.go @@ -131,6 +131,7 @@ func executeRootCmd(baseCtx context.Context, cfg *config2.Config) error { NewClient: func(cache cache.Cache, config *rest.Config, options client.Options, uncachedObjects ...client.Object) (client.Client, error) { return executors.NewFallbackClientBuilder(propellerScope.NewSubScope("kube")).Build(cache, config, options) }, + MetricsBindAddress: "0", } mgr, err := controller.CreateControllerManager(ctx, cfg, options) diff --git a/flytepropeller/cmd/controller/cmd/webhook.go b/flytepropeller/cmd/controller/cmd/webhook.go index e70628a1b..d22da0f28 100644 --- a/flytepropeller/cmd/controller/cmd/webhook.go +++ b/flytepropeller/cmd/controller/cmd/webhook.go @@ -110,8 +110,9 @@ func runWebhook(origContext context.Context, propellerCfg *config.Config, cfg *w NewClient: func(cache cache.Cache, config *rest.Config, options client.Options, uncachedObjects ...client.Object) (client.Client, error) { return executors.NewFallbackClientBuilder(webhookScope).Build(cache, config, options) }, - CertDir: cfg.CertDir, - Port: cfg.ListenPort, + CertDir: cfg.CertDir, + Port: cfg.ListenPort, + MetricsBindAddress: "0", } mgr, err := controller.CreateControllerManager(ctx, propellerCfg, options)