diff --git a/cmd/main.go b/cmd/main.go index a5475bd..3c3e0e3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -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" @@ -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 } }, diff --git a/go.mod b/go.mod index 846cf15..fb468db 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index 1733770..0e96153 100644 --- a/go.sum +++ b/go.sum @@ -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=