Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmd/single/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"golang.org/x/sync/errgroup"
_ "gorm.io/driver/postgres" // Required to import database driver.
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/controller"

Check failure on line 17 in cmd/single/start.go

View workflow job for this annotation

GitHub Actions / compile

"sigs.k8s.io/controller-runtime/pkg/controller" imported and not used
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/metrics"

Expand Down Expand Up @@ -125,8 +126,9 @@
SyncPeriod: &propellerCfg.DownstreamEval.Duration,
DefaultNamespaces: namespaceConfigs,
},
NewCache: executors.NewCache,
NewClient: executors.BuildNewClientFunc(propellerScope),
NewCache: executors.NewCache,
NewClient: executors.BuildNewClientFunc(propellerScope),
MaxConcurrentReconciles: propellerCfg.MaxConcurrentReconciles,

Check failure on line 131 in cmd/single/start.go

View workflow job for this annotation

GitHub Actions / compile

unknown field MaxConcurrentReconciles in struct literal of type manager.Options
Metrics: metricsserver.Options{
// Disable metrics serving
BindAddress: "0",
Expand Down
6 changes: 4 additions & 2 deletions flytepropeller/cmd/controller/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"golang.org/x/sync/errgroup"
"k8s.io/klog"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/metrics"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
Expand Down Expand Up @@ -143,8 +144,9 @@ func executeRootCmd(baseCtx context.Context, cfg *config2.Config) error {
SyncPeriod: &cfg.DownstreamEval.Duration,
DefaultNamespaces: namespaceConfigs,
},
NewCache: executors.NewCache,
NewClient: executors.BuildNewClientFunc(propellerScope),
NewCache: executors.NewCache,
NewClient: executors.BuildNewClientFunc(propellerScope),
MaxConcurrentReconciles: cfg.MaxConcurrentReconciles,
Metrics: metricsserver.Options{
// Disable metrics serving
BindAddress: "0",
Expand Down
6 changes: 4 additions & 2 deletions flytepropeller/cmd/controller/cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
ctrlWebhook "sigs.k8s.io/controller-runtime/pkg/webhook"
Expand Down Expand Up @@ -108,8 +109,9 @@ func runWebhook(origContext context.Context, propellerCfg *config.Config, cfg *w
SyncPeriod: &propellerCfg.DownstreamEval.Duration,
DefaultNamespaces: namespaceConfigs,
},
NewCache: executors.NewCache,
NewClient: executors.BuildNewClientFunc(webhookScope),
NewCache: executors.NewCache,
NewClient: executors.BuildNewClientFunc(webhookScope),
MaxConcurrentReconciles: propellerCfg.MaxConcurrentReconciles,
Metrics: metricsserver.Options{
// Disable metrics serving
BindAddress: "0",
Expand Down
2 changes: 2 additions & 0 deletions flytepropeller/pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ var (
MinSizeInMBForOffloading: 10, // 10 MB is the default size for offloading
MaxSizeInMBForOffloading: 1000, // 1 GB is the default size before failing fast.
},
MaxConcurrentReconciles: 1,
}

// This regex is used to sanitize semver versions passed to IsSupportedSDK checks for literal offloading feature.
Expand Down Expand Up @@ -182,6 +183,7 @@ type Config struct {
NodeExecutionWorkerCount int `json:"node-execution-worker-count" pflag:",Number of workers to evaluate node executions, currently only used for array nodes"`
ArrayNode ArrayNodeConfig `json:"array-node-config,omitempty" pflag:",Configuration for array nodes"`
LiteralOffloadingConfig LiteralOffloadingConfig `json:"literal-offloading-config" pflag:",config used for literal offloading."`
MaxConcurrentReconciles int `json:"max-concurrent-reconciles" pflag:",Max concurrent reconciles for controller-runtime controllers"`
}

type LiteralOffloadingConfig struct {
Expand Down
Loading