Skip to content

Commit

Permalink
Merge pull request #143 from red-hat-storage/sync_ds--main
Browse files Browse the repository at this point in the history
Syncing latest changes from main for kubernetes-csi-addons
  • Loading branch information
openshift-merge-bot[bot] authored May 27, 2024
2 parents 974d6aa + 345fe22 commit d2c2455
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 49 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/container-storage-interface/spec v1.9.0
github.com/csi-addons/spec v0.2.1-0.20230606140122-d20966d2e444
github.com/go-logr/logr v1.4.1
github.com/kubernetes-csi/csi-lib-utils v0.17.0
github.com/kubernetes-csi/csi-lib-utils v0.18.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.33.1
github.com/robfig/cron/v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
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.17.0 h1:xEpJ3WYgMyyYF6fvcKHh4cDRtknuTkBS9rG8bYoLTCU=
github.com/kubernetes-csi/csi-lib-utils v0.17.0/go.mod h1:2Ba5/aQgUjbpqyC2uCcFwMF3rnPVs5jhZXm8jAzcT9Q=
github.com/kubernetes-csi/csi-lib-utils v0.18.0 h1:Tpt1qLIbmpz5ux1hllut/dEWww2VRxdvSSOF4gGwhnA=
github.com/kubernetes-csi/csi-lib-utils v0.18.0/go.mod h1:FEQIcHcZmXZKWKTg18dJbXCHvgtCjnH7/uM0trmZyhU=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
Expand Down
8 changes: 4 additions & 4 deletions sidecar/internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ type clientImpl struct {
}

// Connect to the GRPC client
func (c *clientImpl) connect(address string) (*grpc.ClientConn, error) {
return connection.Connect(address, metrics.NewCSIMetricsManager(""), connection.OnConnectionLoss(connection.ExitOnConnectionLoss()))
func (c *clientImpl) connect(ctx context.Context, address string) (*grpc.ClientConn, error) {
return connection.Connect(ctx, address, metrics.NewCSIMetricsManager(""), connection.OnConnectionLoss(connection.ExitOnConnectionLoss()))
}

// New creates and returns the GRPC client
func New(address string, timeout time.Duration) (Client, error) {
func New(ctx context.Context, address string, timeout time.Duration) (Client, error) {
c := &clientImpl{}
cc, err := c.connect(address)
cc, err := c.connect(ctx, address)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion sidecar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func main() {
klog.Fatalf("Failed to validate controller endpoint: %v", err)
}

csiClient, err := client.New(*csiAddonsAddress, *timeout)
csiClient, err := client.New(context.Background(), *csiAddonsAddress, *timeout)
if err != nil {
klog.Fatalf("Failed to connect to %q : %v", *csiAddonsAddress, err)
}
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/csi-addons/kubernetes-csi-addons/tools
go 1.22.2

require (
github.com/operator-framework/operator-sdk v1.34.1
github.com/operator-framework/operator-sdk v1.34.2
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.34.1
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240102165319-7f316f1309b1
Expand Down
4 changes: 2 additions & 2 deletions tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ github.com/operator-framework/operator-manifest-tools v0.2.3-0.20230525225330-52
github.com/operator-framework/operator-manifest-tools v0.2.3-0.20230525225330-523bad646f89/go.mod h1:PT1D+dEbD9TCoo62TkRP4BHYXA+h+zC0i3Ql7WZW9os=
github.com/operator-framework/operator-registry v1.35.0 h1:BvytqLwhgb0QiAkEODEKXq3vc2vWiHQq0IlofvFA+OI=
github.com/operator-framework/operator-registry v1.35.0/go.mod h1:foC+NO1V9JuDIOk3pjjlrPE0KVkq09m8oDVRz/a/nFA=
github.com/operator-framework/operator-sdk v1.34.1 h1:grKzW8v+LfQYX0eqd7NDvZeKE5ZTIfWbaeJ6YsGC/Wo=
github.com/operator-framework/operator-sdk v1.34.1/go.mod h1:2zrCdmaGoh0lMz0n4g9Qk8djD5+9yRVPU82lYIHWga0=
github.com/operator-framework/operator-sdk v1.34.2 h1:chRaTC8CNxo6Q63f+mBMjP5XTUxhnaftESUkxZHiYhg=
github.com/operator-framework/operator-sdk v1.34.2/go.mod h1:2zrCdmaGoh0lMz0n4g9Qk8djD5+9yRVPU82lYIHWga0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
Expand Down
2 changes: 1 addition & 1 deletion tools/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ github.com/operator-framework/operator-registry/pkg/prettyunmarshaler
github.com/operator-framework/operator-registry/pkg/registry
github.com/operator-framework/operator-registry/pkg/sqlite
github.com/operator-framework/operator-registry/pkg/sqlite/migrations
# github.com/operator-framework/operator-sdk v1.34.1
# github.com/operator-framework/operator-sdk v1.34.2
## explicit; go 1.21
github.com/operator-framework/operator-sdk/cmd/operator-sdk
github.com/operator-framework/operator-sdk/internal/annotations/metrics
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ github.com/josharian/intern
# github.com/json-iterator/go v1.1.12
## explicit; go 1.12
github.com/json-iterator/go
# github.com/kubernetes-csi/csi-lib-utils v0.17.0
## explicit; go 1.21
# github.com/kubernetes-csi/csi-lib-utils v0.18.0
## explicit; go 1.22.0
github.com/kubernetes-csi/csi-lib-utils/accessmodes
github.com/kubernetes-csi/csi-lib-utils/connection
github.com/kubernetes-csi/csi-lib-utils/leaderelection
Expand Down

0 comments on commit d2c2455

Please sign in to comment.