Repository: bitnami-labs/sealed-secrets (language: go)

Issue:
kubeseal 0.17.2 breaks verbose logging
**Which component**:
kubeseal

**Describe the bug**
Setting the `-v` flag has no affect on `kubeseal` version 0.17.2

**To Reproduce**
Run `kubeseal` with `-v=8` (or any other log level), which is missing verbose logs w/ the full GET request & headers:
```
$ ./kubeseal-0.17.2 -v=8 --as <REDACTED> --as-group 'system:authenticated' --controller-namespace <REDACTED>-sealed-secrets --fetch-cert
-----BEGIN CERTIFICATE-----
<REDACTED>
-----END CERTIFICATE-----
```

**Expected behavior**
0.17.1 works as expected:

```
$ ./kubeseal-0.17.1 -v=8 --as <REDACTED> --as-group 'system:authenticated' --controller-namespace <REDACTED>-sealed-secrets --fetch-cert
I0121 15:20:33.288455  266965 loader.go:375] Config loaded from file:  /home/<REDACTED>/.kube/config
I0121 15:20:33.288809  266965 round_trippers.go:420] GET https://api.<REDACTED>:6443/api/v1/namespaces/<REDACTED>-sealed-secrets/services/http:sealed-secrets-controller:/proxy/v1/cert.pem
I0121 15:20:33.288820  266965 round_trippers.go:427] Request Headers:
I0121 15:20:33.288825  266965 round_trippers.go:431]     Impersonate-User: <REDACTED>
I0121 15:20:33.288829  266965 round_trippers.go:431]     Impersonate-Group: system:authenticated
I0121 15:20:33.288833  266965 round_trippers.go:431]     User-Agent: kubeseal-0.17.1/v0.0.0 (linux/amd64) kubernetes/$Format
I0121 15:20:33.288838  266965 round_trippers.go:431]     Accept: application/x-pem-file, */*
I0121 15:20:33.288842  266965 round_trippers.go:431]     Authorization: Bearer <masked>
I0121 15:20:33.468957  266965 round_trippers.go:446] Response Status: 200 OK in 180 milliseconds
I0121 15:20:33.469045  266965 round_trippers.go:449] Response Headers:
I0121 15:20:33.469069  266965 round_trippers.go:452]     Audit-Id: e47e08ed-d701-4f47-a9e5-8fcd746be626
I0121 15:20:33.469097  266965 round_trippers.go:452]     Cache-Control: no-cache, private
I0121 15:20:33.469128  266965 round_trippers.go:452]     Content-Type: application/x-pem-file
I0121 15:20:33.469156  266965 round_trippers.go:452]     Date: Fri, 21 Jan 2022 14:20:33 GMT
I0121 15:20:33.469183  266965 round_trippers.go:452]     Content-Length: 1684
-----BEGIN CERTIFICATE-----
<REDACTED>
-----END CERTIFICATE-----
```

**Version of Kubernetes**:

```
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0", GitCommit:"af46c47ce925f4c4ad5cc8d1fca46c7b77d13b38", GitTreeState:"clean", BuildDate:"2020-12-08T17:59:43Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0+bbbc079", GitCommit:"bbbc0799c02950831c42c7a2ab0a04594b854d4a", GitTreeState:"clean", BuildDate:"2021-09-17T20:21:04Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"linux/amd64"}

$ oc version
Client Version: 4.7.0-202106120124.p0.git.9b9f77a-9b9f77a
Server Version: 4.7.33
Kubernetes Version: v1.20.0+bbbc079
```


**Additional context**
Add any other context about the problem here.



Discussion / hints:

Fix patch:
diff --git a/cmd/kubeseal/main.go b/cmd/kubeseal/main.go
index 1754f7cef6..1f2ac97b51 100644
--- a/cmd/kubeseal/main.go
+++ b/cmd/kubeseal/main.go
@@ -34,7 +34,7 @@ import (
 	"k8s.io/client-go/tools/clientcmd"
 	"k8s.io/client-go/util/cert"
 	"k8s.io/client-go/util/keyutil"
-	"k8s.io/klog"
+	"k8s.io/klog/v2"
 
 	ssv1alpha1 "github.com/bitnami-labs/sealed-secrets/pkg/apis/sealed-secrets/v1alpha1"
 
diff --git a/go.mod b/go.mod
index ea48544cbd..c730f5722c 100644
--- a/go.mod
+++ b/go.mod
@@ -23,4 +23,5 @@ require (
 	k8s.io/client-go v0.22.1
 	k8s.io/code-generator v0.16.8
 	k8s.io/klog v1.0.0
+	k8s.io/klog/v2 v2.9.0
 )


Test patch: