Closed paralin closed 6 years ago
This set of versions works for me:
# Kubernetes client
- package: k8s.io/client-go
version: v4.0.0
- package: k8s.io/apimachinery
version: release-1.7
- package: k8s.io/apiextensions-apiserver
version: release-1.7
- package: k8s.io/api
version: 4b8fc5be9b77d91bbb6525d18591c43699a2b4e5
... and by "works", I mean compiles
If you are using dep
, you need to use an override like this:
[[override]]
name="k8s.io/api"
revision="4b8fc5be9b77d91bbb6525d18591c43699a2b4e5"
[[override]]
name = "k8s.io/apimachinery"
revision = "1fd2e63a9a370677308a42f24fd40c86438afddf"
For dep
the following override is needed based on https://github.com/kubernetes/client-go/issues/298
[[override]]
name = "github.com/ugorji/go"
revision = "8c0409fcbb70099c748d71f714529204975f6c3f"
Hi folks, 4b8fc5be9b77d91bbb6525d18591c43699a2b4e5
compiles. But I need package "k8s.io/api/apps/v1beta2" (because I need to use the StatefulSet
), which was added after this version. How do I find a suitable version?
@idealhack The way I have done it is to use the version of client-go you need (5.0.0 in this case) and then look at its Godeps to see what versions they are using there. That generally works for me
@thomastaylor312 Thank you! So a match (newer) version of client-go will do it. I’ve saw the maintainer released v5.0.0 10 hours ago.
Update: I'm using kubernetes-1.8.1
for client-go
, api
, apimachinery
now. Maybe use a same tag is better as they come from the same upstream.
I get following errors when i vendor in client-go, apimachinery and api of kubernetes-1.8.1
tag.
k8s.io/client-go/tools/clientcmd/overrides.go:122:3: invalid operation: flags (variable of type <company git>/<project>/vendor/github.com/spf13/pflag.FlagSet) has no field or method StringArrayVarP
/k8s.io/client-go/util/flowcontrol/throttle.go:59:2: Clock not declared by package ratelimit
k8s.io/client-go/util/flowcontrol/throttle.go:65:13: NewBucketWithRateAndClock not declared by package ratelimit
Any help would be appreciated.
client go uses spf13/pflag, our code does not use that. I dont see this spf13/pflag package in our Gopkg.toml file.
I had same issue. And I find this may depend on api and apimachinery version. I use as below: cd apimachinery && git checkout release-1.7 cd api && git checkout master go build ./... I will get the same issue.
Then I tried the following combination: apimachinery: master && api: master apimachinery: release-1.9 && api: master apimachinery: release-1.8 && api: master They are all can build successfully!
So, I suggest that try to use apimachinery version >= release-1.8 with api.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten /remove-lifecycle stale
I'm continuously running into this error:
metav1.List is an interface, you can't have a
*List
. Why is this even a thing? What versions can I revert to to fix this?