Skip to content

Commit

Permalink
Migrated leader election to lease API
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilSharmaWe committed May 31, 2022
1 parent a35bec6 commit 7dc766f
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 92 deletions.
2 changes: 1 addition & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ func (ctrl *ProvisionController) Run(ctx context.Context) {
go ctrl.volumeStore.Run(ctx, DefaultThreadiness)

if ctrl.leaderElection {
rl, err := resourcelock.New("endpoints",
rl, err := resourcelock.New("endpointsleases",
ctrl.leaderElectionNamespace,
strings.Replace(ctrl.provisionerName, "/", "-", -1),
ctrl.client.CoreV1(),
Expand Down
13 changes: 5 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ go 1.16

require (
github.com/miekg/dns v1.1.29
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/prometheus/client_golang v1.5.1
github.com/prometheus/client_model v0.2.0
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
k8s.io/api v0.19.1
k8s.io/apimachinery v0.19.1
k8s.io/client-go v0.19.1
k8s.io/klog/v2 v2.3.0
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.24.0
k8s.io/klog/v2 v2.60.1
)
Loading

0 comments on commit 7dc766f

Please sign in to comment.