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 Feb 7, 2022
1 parent a35bec6 commit febe6b7
Show file tree
Hide file tree
Showing 3 changed files with 351 additions and 9 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
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ module sigs.k8s.io/sig-storage-lib-external-provisioner/v8
go 1.16

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501 // indirect
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-20210723032227-1f47c861a9ac
k8s.io/api v0.23.3
k8s.io/apimachinery v0.23.3
k8s.io/client-go v0.23.3
k8s.io/klog/v2 v2.30.0
)
Loading

0 comments on commit febe6b7

Please sign in to comment.