Skip to content

Commit

Permalink
Merge pull request #36 from chu-yik/main
Browse files Browse the repository at this point in the history
Construct resizer lease name from driver name
  • Loading branch information
torredil authored Nov 1, 2024
2 parents 25bb74d + 307a169 commit b7afd8f
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 b7afd8f

Please sign in to comment.