Repository: kubernetes-csi/csi-driver-smb
Pull request #57 (2020-07-10 01:56:48)

chore: move to klog/v2
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. For reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/release.md#issue-kind-label
3. Ensure you have added or ran the appropriate tests for your PR: https://git.k8s.io/community/contributors/devel/testing.md
4. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
5. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md
6. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

**What type of PR is this?**
 /kind cleanup

**What this PR does / why we need it**:
chore: move to klog/v2

**Which issue(s) this PR fixes**:
<!-- 
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

**Requirements**:
- [x] uses [conventional commit messages](https://www.conventionalcommits.org/)
  <!-- Common commit types:
        build: Build 🏭
        chore: Maintenance 🔧
        ci: Continuous Integration 💜
        docs: Documentation 📘
        feat: Features 🌈
        fix: Bug Fixes 🐞
        perf: Performance Improvements 🚀
        refactor: Code Refactoring 💎
        revert: Revert Change ◀️
        style: Code Style 🎶
        security: Security Fix 🛡️
        test: Testing 💚 -->
- [ ] includes documentation
- [ ] adds unit tests
- [ ] tested upgrade from previous version

**Special notes for your reviewer**:


**Release note**:
```
none
```



Patch:
diff --git a/deploy/example/smb-provisioner/smb-server.yaml b/deploy/example/smb-provisioner/smb-server.yaml
index 2079fe5d8..b0f3746fb 100644
--- a/deploy/example/smb-provisioner/smb-server.yaml
+++ b/deploy/example/smb-provisioner/smb-server.yaml
@@ -6,7 +6,7 @@ metadata:
   labels:
     app: smb-server
 spec:
-  type: ClusterIP # use "LoadBalancer" to get a public ip
+  type: ClusterIP  # use "LoadBalancer" to get a public ip
   selector:
     app: smb-server
   ports:
diff --git a/go.mod b/go.mod
index fb7f76208..9daa22027 100644
--- a/go.mod
+++ b/go.mod
@@ -19,7 +19,7 @@ require (
 	golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
 	google.golang.org/grpc v1.27.0
 	k8s.io/apimachinery v0.18.2-beta.0
-	k8s.io/klog v1.0.0
+	k8s.io/klog/v2 v2.2.0
 	k8s.io/utils v0.0.0-20200411171748-3d5a2fe318e4
 	sigs.k8s.io/yaml v1.2.0
 )
diff --git a/pkg/csi-common/controllerserver-default.go b/pkg/csi-common/controllerserver-default.go
index 7c2f513d2..b2f406566 100644
--- a/pkg/csi-common/controllerserver-default.go
+++ b/pkg/csi-common/controllerserver-default.go
@@ -17,7 +17,7 @@ limitations under the License.
 package csicommon
 
 import (
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 
 	"github.com/container-storage-interface/spec/lib/go/csi"
 	"golang.org/x/net/context"
diff --git a/pkg/csi-common/driver.go b/pkg/csi-common/driver.go
index c01321018..d70c58caf 100644
--- a/pkg/csi-common/driver.go
+++ b/pkg/csi-common/driver.go
@@ -18,7 +18,7 @@ package csicommon
 
 import (
 	"github.com/container-storage-interface/spec/lib/go/csi"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
diff --git a/pkg/csi-common/identityserver-default.go b/pkg/csi-common/identityserver-default.go
index 1b6adb476..8fc9488cf 100644
--- a/pkg/csi-common/identityserver-default.go
+++ b/pkg/csi-common/identityserver-default.go
@@ -21,7 +21,7 @@ import (
 	"golang.org/x/net/context"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 )
 
 type DefaultIdentityServer struct {
diff --git a/pkg/csi-common/nodeserver-default.go b/pkg/csi-common/nodeserver-default.go
index bcc031412..5d94b91a3 100644
--- a/pkg/csi-common/nodeserver-default.go
+++ b/pkg/csi-common/nodeserver-default.go
@@ -19,7 +19,7 @@ package csicommon
 import (
 	"github.com/container-storage-interface/spec/lib/go/csi"
 	"golang.org/x/net/context"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 )
 
 type DefaultNodeServer struct {
diff --git a/pkg/csi-common/server.go b/pkg/csi-common/server.go
index 2e63f44de..5d3209a15 100644
--- a/pkg/csi-common/server.go
+++ b/pkg/csi-common/server.go
@@ -24,7 +24,7 @@ import (
 	"time"
 
 	"google.golang.org/grpc"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 
 	"github.com/container-storage-interface/spec/lib/go/csi"
 )
diff --git a/pkg/csi-common/utils.go b/pkg/csi-common/utils.go
index 351f5b6c9..ad793446d 100644
--- a/pkg/csi-common/utils.go
+++ b/pkg/csi-common/utils.go
@@ -21,7 +21,7 @@ import (
 	"github.com/container-storage-interface/spec/lib/go/csi"
 	"golang.org/x/net/context"
 	"google.golang.org/grpc"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 	"regexp"
 	"strings"
 )
diff --git a/pkg/mounter/safe_mounter_windows.go b/pkg/mounter/safe_mounter_windows.go
index 1adff73bb..8ad5fb09b 100644
--- a/pkg/mounter/safe_mounter_windows.go
+++ b/pkg/mounter/safe_mounter_windows.go
@@ -31,7 +31,7 @@ import (
 	smbv1alpha1 "github.com/kubernetes-csi/csi-proxy/client/api/smb/v1alpha1"
 	smbclientv1alpha1 "github.com/kubernetes-csi/csi-proxy/client/groups/smb/v1alpha1"
 
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 	utilexec "k8s.io/utils/exec"
 	"k8s.io/utils/mount"
 )
diff --git a/pkg/smb/controllerserver.go b/pkg/smb/controllerserver.go
index 85a5a2935..cb0f43579 100644
--- a/pkg/smb/controllerserver.go
+++ b/pkg/smb/controllerserver.go
@@ -22,7 +22,7 @@ import (
 	"github.com/container-storage-interface/spec/lib/go/csi"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 )
 
 // CreateVolume not implemented, only for sanity test pass
diff --git a/pkg/smb/identityserver.go b/pkg/smb/identityserver.go
index e2873fc54..db8025f23 100644
--- a/pkg/smb/identityserver.go
+++ b/pkg/smb/identityserver.go
@@ -24,7 +24,7 @@ import (
 
 	"github.com/container-storage-interface/spec/lib/go/csi"
 	"github.com/golang/protobuf/ptypes/wrappers"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 )
 
 // GetPluginInfo return the version and name of the plugin
diff --git a/pkg/smb/nodeserver.go b/pkg/smb/nodeserver.go
index 415393297..1456e792f 100644
--- a/pkg/smb/nodeserver.go
+++ b/pkg/smb/nodeserver.go
@@ -28,7 +28,7 @@ import (
 	"github.com/container-storage-interface/spec/lib/go/csi"
 
 	"k8s.io/apimachinery/pkg/util/wait"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
diff --git a/pkg/smb/smb.go b/pkg/smb/smb.go
index cf566ec85..c7b9ce533 100644
--- a/pkg/smb/smb.go
+++ b/pkg/smb/smb.go
@@ -21,7 +21,7 @@ import (
 
 	"github.com/container-storage-interface/spec/lib/go/csi"
 
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 	"k8s.io/utils/mount"
 
 	csicommon "github.com/kubernetes-csi/csi-driver-smb/pkg/csi-common"
diff --git a/pkg/smb/smb_common_windows.go b/pkg/smb/smb_common_windows.go
index 0c198e65d..4f9b4b0ea 100644
--- a/pkg/smb/smb_common_windows.go
+++ b/pkg/smb/smb_common_windows.go
@@ -22,7 +22,7 @@ import (
 	"fmt"
 
 	"github.com/kubernetes-csi/csi-driver-smb/pkg/mounter"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 	"k8s.io/utils/mount"
 )
 
diff --git a/pkg/smbplugin/main.go b/pkg/smbplugin/main.go
index 25a9807cb..06d9bba06 100644
--- a/pkg/smbplugin/main.go
+++ b/pkg/smbplugin/main.go
@@ -28,7 +28,7 @@ import (
 	"github.com/kubernetes-csi/csi-driver-smb/pkg/smb"
 
 	"github.com/prometheus/client_golang/prometheus/promhttp"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 )
 
 func init() {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index da5c137d1..8aa345473 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -136,7 +136,7 @@ k8s.io/apimachinery/pkg/util/runtime
 k8s.io/apimachinery/pkg/util/wait
 # k8s.io/klog v1.0.0 => k8s.io/klog v1.0.0
 k8s.io/klog
-# k8s.io/klog/v2 v2.0.0 => k8s.io/klog/v2 v2.0.0
+# k8s.io/klog/v2 v2.2.0 => k8s.io/klog/v2 v2.0.0
 k8s.io/klog/v2
 # k8s.io/utils v0.0.0-20200411171748-3d5a2fe318e4 => k8s.io/utils v0.0.0-20200411171748-3d5a2fe318e4
 k8s.io/utils/exec


Test patch:
diff --git a/pkg/csi-common/utils_test.go b/pkg/csi-common/utils_test.go
index c60bef409..fedc685f3 100644
--- a/pkg/csi-common/utils_test.go
+++ b/pkg/csi-common/utils_test.go
@@ -21,7 +21,7 @@ import (
 	"context"
 	"flag"
 	"google.golang.org/grpc"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 	"testing"
 
 	"github.com/container-storage-interface/spec/lib/go/csi"