Skip to content
Open
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
5 changes: 5 additions & 0 deletions cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/alecthomas/kingpin/v2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/config"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

xpcontroller "github.com/crossplane/crossplane-runtime/v2/pkg/controller"
Expand All @@ -47,6 +48,7 @@ func main() {
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").Envar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int()
enableManagementPolicies = app.Flag("enable-management-policies", "Enable/disable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool()
cacheSyncTimeout = app.Flag("cache-sync-timeout", "Timeout for syncing caches.").Default("2m").Duration()
)
kingpin.MustParse(app.Parse(os.Args[1:]))

Expand All @@ -70,6 +72,9 @@ func main() {
Cache: cache.Options{
SyncPeriod: syncPeriod,
},
Controller: config.Controller{
CacheSyncTimeout: *cacheSyncTimeout,
},
})
kingpin.FatalIfError(err, "Cannot create controller manager")
kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add SQL APIs to scheme")
Expand Down