From 7c7ae3f3eb76d2e137f54229a445cd6b3756f6cb Mon Sep 17 00:00:00 2001 From: Jon Huhn Date: Wed, 27 Dec 2023 00:07:26 -0600 Subject: [PATCH] fix envtest setup flake --- internal/test/env/env.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/test/env/env.go b/internal/test/env/env.go index 637e4598479..7a0bea6dd30 100644 --- a/internal/test/env/env.go +++ b/internal/test/env/env.go @@ -43,6 +43,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/metrics/server" ) var ( @@ -102,6 +103,9 @@ func NewTestEnvironment() *TestEnvironment { mgr, err := manager.New(env.Config, manager.Options{ Scheme: scheme, + Metrics: server.Options{ + BindAddress: "0", + }, }) if err != nil { klog.Fatalf("Failed to start testenv manager: %v", err)