-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems building Go application with client-go #749
Comments
I found the similar issue building the repo's master example for |
I also receive the same error. |
Fixed @sbhardwaj-mt's and mine error by using the following go.mod:
|
It might not resolve your issue but can you try to replace |
I'm having similar issues with dependencies unfortunately:
Here's my go.mod file:
|
Sorry for the noise but I've just resolved this by doing:
|
yes, works for me. |
This is still a problem, and being forced to use |
I have the same problem. |
same problem |
Related issue is that |
Unfortunately, that is not possible to resolve. k8s.io/client-go had major versions tagged prior to the introduction of go modules. go modules require any major version X >= 2 rename the module to Go considers tags >= 2.x.x which contain a go.mod file with a module name that doesn't end with |
This is really painful for upgrades, and the selected version scheme conflicts with minimum version selection in nuanced and complex ways. Is there any plan to improve things, or are you indicating that it is not yet painful enough to justify investment? Spitballing alternatives:
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
same problem |
This module has a major issue with its version tags that confuse Golang: Latest version tag is supposed to be v0.20.4, but there are also tags of v1.. through v12.0.0 (dated Jun 20, 2019) This breaks basic module versioning as of GO 1.11. If you don't select a version for v2 or greater that it will only pull the highest major of 0 or 1. Which as of today is v1.5.2 which contains a go.mod that retracts all previous module versions including v1.5.2. I have no idea if that works or not, but since I'm still having trouble just using the module without an explicit replace directive in my go.mod, I suspect it's not. I created a similar issue in one of my repos and the only way to deal with it was to delete the version tags for the higher versions. Otherwise, everyone has to manually run the replace, and they won't pick up changes on an update. That's a major pain and makes it difficult to stay current for security fixes. I appreciate that some people may have hard coded those old version tags, but IMHO, they need to be removed. They have been causing problems for over a year. |
using go1.16 (which honors the retract directives we just added),
Deleting the old tags has all the downsides of disrupting builds of older clients, and wouldn't remove cached versions of those versions held by things like the module proxy. Explicitly specifying the version you want with |
The reporter of this issue in particular is encountering problems because it is trying to depend on k8s.io/kubernetes as a library, which is not recommended or supported. For more general |
Here is a workaround that could help, especially if you are using Kubernetes 1.14 : #741 (comment) |
Problem Description
I am not being able to compile my application due to client-go.
I am working on a different scheduler for Kubernetes. These are my main dependencies:
Dependencies
Compilation Error
I tried to use go.mod but I had no success, unable to sync packages:
go.mod:
Any way to make it work with or without go.mod? How it is supposed to write the Dockerfile?
The text was updated successfully, but these errors were encountered: