From 061aeebbcf0892ee54143b6ef58180d09f772d7e Mon Sep 17 00:00:00 2001 From: Daniel Rammer Date: Mon, 22 Jan 2024 10:41:07 -0600 Subject: [PATCH] addressing pr comments Signed-off-by: Daniel Rammer --- cmd/single/start.go | 2 +- flytepropeller/cmd/controller/cmd/webhook.go | 2 +- flytepropeller/pkg/controller/executors/kube.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/single/start.go b/cmd/single/start.go index 2519646da4..a86fc3772b 100644 --- a/cmd/single/start.go +++ b/cmd/single/start.go @@ -122,7 +122,7 @@ func startPropeller(ctx context.Context, cfg Propeller) error { DefaultNamespaces: namespaceConfigs, }, NewCache: executors.NewCache, - NewClient: executors.BuildNewClientFunc(50000, propellerScope), + NewClient: executors.BuildNewClientFunc(propellerScope), Metrics: metricsserver.Options{ // Disable metrics serving BindAddress: "0", diff --git a/flytepropeller/cmd/controller/cmd/webhook.go b/flytepropeller/cmd/controller/cmd/webhook.go index b8a88f516b..ae538385fb 100644 --- a/flytepropeller/cmd/controller/cmd/webhook.go +++ b/flytepropeller/cmd/controller/cmd/webhook.go @@ -109,7 +109,7 @@ func runWebhook(origContext context.Context, propellerCfg *config.Config, cfg *w DefaultNamespaces: namespaceConfigs, }, NewCache: executors.NewCache, - NewClient: executors.BuildNewClientFunc(50000, propellerScope), + NewClient: executors.BuildNewClientFunc(webhookScope), Metrics: metricsserver.Options{ // Disable metrics serving BindAddress: "0", diff --git a/flytepropeller/pkg/controller/executors/kube.go b/flytepropeller/pkg/controller/executors/kube.go index e4dbeea578..c46b9fa65d 100644 --- a/flytepropeller/pkg/controller/executors/kube.go +++ b/flytepropeller/pkg/controller/executors/kube.go @@ -33,7 +33,7 @@ var NewCache = func(config *rest.Config, options cache.Options) (cache.Cache, er return otelutils.WrapK8sCache(k8sCache), nil } -func BuildNewClientFunc(writeFilterSize int, scope promutils.Scope) func(config *rest.Config, options client.Options) (client.Client, error) { +func BuildNewClientFunc(scope promutils.Scope) func(config *rest.Config, options client.Options) (client.Client, error) { return func(config *rest.Config, options client.Options) (client.Client, error) { var cacheReader client.Reader cachelessOptions := options @@ -44,10 +44,10 @@ func BuildNewClientFunc(writeFilterSize int, scope promutils.Scope) func(config k8sClient, err := client.New(config, cachelessOptions) if err != nil { - return k8sClient, err + return nil, err } - filter, err := fastcheck.NewOppoBloomFilter(writeFilterSize, scope.NewSubScope("kube_filter")) + filter, err := fastcheck.NewOppoBloomFilter(50000, scope.NewSubScope("kube_filter")) if err != nil { return nil, err }