Skip to content

Commit

Permalink
fix manager.Options syncPeriod
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyakolluru committed Feb 23, 2024
1 parent a8164c2 commit 29ac945
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/leaderelection/resourcelock"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/upbound/provider-vault/apis"
Expand Down Expand Up @@ -70,9 +71,10 @@ func main() {
kingpin.FatalIfError(err, "Cannot get API server rest config")

mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Cache: cache.Options{SyncPeriod: syncPeriod},

LeaderElection: *leaderElection,
LeaderElectionID: "crossplane-leader-election-provider-vault",
SyncPeriod: syncPeriod,
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(),
RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(),
Expand Down

0 comments on commit 29ac945

Please sign in to comment.