Skip to content

Commit

Permalink
Reading encryption in case of api key reset (#91)
Browse files Browse the repository at this point in the history
* Reading encryption in case of api key reset

* Bug found during testing

* Fix for format and mount failed issue

* Updating ibm-csi-common release

* Updating golang version

* go mod tidy

* Update golang version to 1.18.2
  • Loading branch information
GunaKKIBM authored Jul 8, 2022
1 parent c0be59a commit 3d15ba7
Show file tree
Hide file tree
Showing 54 changed files with 162 additions and 664 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.18'
- name: Check out code
uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
- GO111MODULE=on

go:
- "1.16.x"
- "1.18.2"

before_install:
- go install github.com/mattn/goveralls@latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16.13
FROM golang:1.18.2

WORKDIR /go/src/github.com/kubernetes-sigs/ibm-vpc-block-csi-driver
ADD . /go/src/github.com/kubernetes-sigs/ibm-vpc-block-csi-driver
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GIT_COMMIT_SHA="$(shell git rev-parse HEAD 2>/dev/null)"
GIT_REMOTE_URL="$(shell git config --get remote.origin.url 2>/dev/null)"
BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")"
OSS_FILES := go.mod Dockerfile
GOLANG_VERSION="1.16.13"
GOLANG_VERSION="1.18.2"


STAGING_REGISTRY ?= gcr.io/k8s-staging-cloud-provider-ibm
Expand Down
64 changes: 61 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/kubernetes-sigs/ibm-vpc-block-csi-driver

go 1.16
go 1.18

require (
github.com/IBM/ibm-csi-common v1.0.0-beta16
github.com/IBM/ibm-csi-common v1.0.0-beta17
github.com/IBM/ibmcloud-volume-interface v1.0.0-beta10
github.com/IBM/ibmcloud-volume-vpc v1.0.0-beta15
github.com/container-storage-interface/spec v1.5.0
Expand All @@ -16,11 +16,69 @@ require (
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40
google.golang.org/grpc v1.34.0
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
k8s.io/kubernetes v1.21.0
k8s.io/mount-utils v0.21.0
)

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.6.7 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.0 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.4.1 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/nxadm/tail v1.4.5 // indirect
github.com/onsi/ginkgo v1.14.2 // indirect
github.com/onsi/gomega v1.10.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20201209185603-f92720507ed4 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
k8s.io/api v0.21.0 // indirect
k8s.io/apimachinery v0.21.0 // indirect
k8s.io/apiserver v0.21.0 // indirect
k8s.io/client-go v11.0.1-0.20190516230509-ae8359b20417+incompatible // indirect
k8s.io/component-base v0.21.0 // indirect
k8s.io/klog/v2 v2.8.0 // indirect
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

replace (
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.1.0
k8s.io/api => k8s.io/api v0.21.0
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ=
github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.6.7 h1:eHgfQl6IeSmzWUyiSi13CvoFYsovoyqWlpHX0pa9J54=
github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.6.7/go.mod h1:RiUvKuHKTBmBApDMUQzBL14pQUGKcx/IioKQPIcRQjs=
github.com/IBM/ibm-csi-common v1.0.0-beta16 h1:nOrRJl3Nw/1zHKRspZ2BJcZiYl4VZ59MK6rCFTGZSZ4=
github.com/IBM/ibm-csi-common v1.0.0-beta16/go.mod h1:PeSXn0la1H7hKalfIwgeldFQ7I5d9h6j6pPId3qxlb8=
github.com/IBM/ibm-csi-common v1.0.0-beta17 h1:isL5pGzz52eKiuJJp3M5OmpBAghcONjSzcmK8RDniiw=
github.com/IBM/ibm-csi-common v1.0.0-beta17/go.mod h1:PeSXn0la1H7hKalfIwgeldFQ7I5d9h6j6pPId3qxlb8=
github.com/IBM/ibmcloud-volume-interface v1.0.0-beta10 h1:m3OO2Xd7NDWovxwa8KLsdUsP95NkKpMJ8YWBS1pa0Ew=
github.com/IBM/ibmcloud-volume-interface v1.0.0-beta10/go.mod h1:BWj2o0UmOSI1rGcObFYmpQgX0zHuhm51W5o+Js8BHcE=
github.com/IBM/ibmcloud-volume-vpc v1.0.0-beta15 h1:NdosO0H9xyKv0jWpWaSOiYcUSaqik0PYUItF+CMxt+w=
Expand Down Expand Up @@ -88,7 +88,6 @@ github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx2
github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E=
github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down
2 changes: 1 addition & 1 deletion hack/verify-golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -euo pipefail

if [[ -z "$(command -v golangci-lint)" ]]; then
echo "Cannot find golangci-lint. Installing golangci-lint..."
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
export PATH=$PATH:$(go env GOPATH)/bin
fi

Expand Down
4 changes: 3 additions & 1 deletion pkg/ibmcsidriver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package ibmcsidriver
import (
"fmt"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"
Expand Down Expand Up @@ -285,7 +286,8 @@ func (csiNS *CSINodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeSt
// This operation (NodeStageVolume) MUST be idempotent.
// If the volume corresponding to the volume_id is already staged to the staging_target_path,
// and is identical to the specified volume_capability the Plugin MUST reply 0 OK.
if device == source {
target, err := filepath.EvalSymlinks(source)
if err == nil && device == target {
ctxLogger.Info("volume already staged", zap.String("volumeID", volumeID))
return &csi.NodeStageVolumeResponse{}, nil
}
Expand Down

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

3 changes: 0 additions & 3 deletions vendor/github.com/cespare/xxhash/v2/go.mod

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions vendor/github.com/fsnotify/fsnotify/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/github.com/fsnotify/fsnotify/go.sum

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/go-logr/logr/go.mod

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/golang-jwt/jwt/v4/go.mod

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions vendor/github.com/google/gofuzz/go.mod

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/google/uuid/go.mod

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/hashicorp/golang-lru/go.mod

This file was deleted.

11 changes: 0 additions & 11 deletions vendor/github.com/json-iterator/go/go.mod

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/json-iterator/go/go.sum

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/kelseyhightower/envconfig/go.mod

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/nxadm/tail/go.mod

This file was deleted.

6 changes: 0 additions & 6 deletions vendor/github.com/nxadm/tail/go.sum

This file was deleted.

11 changes: 0 additions & 11 deletions vendor/github.com/onsi/ginkgo/go.mod

This file was deleted.

Loading

0 comments on commit 3d15ba7

Please sign in to comment.