Skip to content

Commit

Permalink
Construct resizer lease name from driver name
Browse files Browse the repository at this point in the history
  • Loading branch information
chu-yik committed Oct 31, 2024
1 parent 25bb74d commit 307a169
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/awslabs/volume-modifier-for-k8s/pkg/controller"
"github.com/awslabs/volume-modifier-for-k8s/pkg/modifier"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/external-resizer/pkg/util"
v1 "k8s.io/api/coordination/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/informers"
Expand Down Expand Up @@ -155,7 +156,8 @@ func main() {
klog.ErrorS(nil, "Failed to process object, expected it to be a Lease", "obj", newObj)
return
}
if lease.Name == "external-resizer-ebs-csi-aws-com" {
resizerLeaseName := "external-resizer-" + util.SanitizeName(driverName)
if lease.Name == resizerLeaseName {
leaseChannel <- lease
}
},
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/kubernetes-csi/external-resizer v1.12.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubernetes-csi/csi-lib-utils v0.19.0 h1:3sT8mL9+St2acyrEtuR7CQ5L78GR4lgsb+sfon9tGfA=
github.com/kubernetes-csi/csi-lib-utils v0.19.0/go.mod h1:lBuMKvoyd8c3EG+itmnVWApLDHnLkU7ibxxZSPuOw0M=
github.com/kubernetes-csi/external-resizer v1.12.0 h1:HC7a0wEshJIwib3y/8IUi+eqJ6xYn51pueYt2wmps+8=
github.com/kubernetes-csi/external-resizer v1.12.0/go.mod h1:S+v7ta840+8BS0E1g27PvfSORTkPAJQ7zdKtgowOoJA=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
Expand Down

0 comments on commit 307a169

Please sign in to comment.