Skip to content

Commit

Permalink
addressing pr comments
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw committed Jan 22, 2024
1 parent 0fc75c4 commit 061aeeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/single/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion flytepropeller/cmd/controller/cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions flytepropeller/pkg/controller/executors/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 061aeeb

Please sign in to comment.