Hi,
I am getting the below error while trying to build an image using the client-go lib.
Can someone help.
/go/src/k8s.io/client-go/transport/round_trippers.go:70:11: cannot convert klog.V(9) (type klog.Verbose) to type bool
k8s.io/client-go/util/keyutil
/go/src/k8s.io/client-go/transport/round_trippers.go:70:11: cannot convert klog.V(9) (type klog.Verbose) to type bool
/go/src/k8s.io/client-go/transport/round_trippers.go:72:11: cannot convert klog.V(8) (type klog.Verbose) to type bool
/go/src/k8s.io/client-go/transport/round_trippers.go:74:11: cannot convert klog.V(7) (type klog.Verbose) to type bool
/go/src/k8s.io/client-go/transport/round_trippers.go:76:11: cannot convert klog.V(6) (type klog.Verbose) to type bool
golang.org/x/time/rate
Same issue.
The code in go-client seems to be broken. https://github.com/kubernetes/client-go/blob/e290f153d148a0f609c950737af766dd6efcb5f1/transport/round_trippers.go#L68
@tedyu can you pls have a look.
@sunnyanand17 The effects of this are reported in other issues
the master version of k8s.io/klog changed the type in https://github.com/kubernetes/klog/pull/20
How about the following change ?
diff --git a/staging/src/k8s.io/client-go/transport/round_trippers.go b/staging/src/k8s.io/client-go/transport/round_trippers.go
index 844ee9a21b..79c223dd29 100644
--- a/staging/src/k8s.io/client-go/transport/round_trippers.go
+++ b/staging/src/k8s.io/client-go/transport/round_trippers.go
@@ -67,7 +67,7 @@ func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTrip
// DebugWrappers wraps a round tripper and logs based on the current log level.
func DebugWrappers(rt http.RoundTripper) http.RoundTripper {
switch {
- case bool(klog.V(9)):
+ case klog.V(9).Enabled():
rt = newDebuggingRoundTripper(rt, debugCurlCommand, debugURLTiming, debugResponseHeaders)
case bool(klog.V(8)):
rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus, debugResponseHeaders)
If it looks good, I can send a PR
Its very important for me to get this in guys, I will really appreciate this. My whole product GA is hung now. Pls help.
any change would happen via a PR to kubernetes/kubernetes, paired with a corresponding bump of klog. can discuss the best approach in that repo. Existing branches of client-go will not be updated. Builds against existing branches of client-go should use the version of klog that corresponds to that version of client-go.
For example, for the latest release branch:
https://github.com/kubernetes/client-go/blob/release-13.0/go.mod#L31
@liggitt I am just referencing k8s.io/client-go in the application and using 'go get' when building the image. What's the work-around?
I am doing the same. It would be great if we can have some temp fix.
Using below in my image and leaving it to the K8 client to resolve the downstream libraries.
RUN go get -v ./...
RUN go install -v ./...
Not using any dependency management as of now.
Same issue.
Same issue.
you will need to either:
go get k8s.io/klog && cd $GOPATH/src/k8s.io/klog && git checkout v0.4.0Why not update everything at once? Including the go client?
Most helpful comment
you will need to either:
go get k8s.io/klog && cd $GOPATH/src/k8s.io/klog && git checkout v0.4.0