-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
kubebuilder create api for controller-gen step is not working #2692
Comments
Hi @ryanbrainard, This issue seems to be introduced with the changes to replace go get with go install. Could you please give a hand on this one? |
@camilamacedo86 I think you might have the wrong person. I've used this repo, but I don't think I've done anything with that. |
Sorry, it should be @ryantking :) |
I'm facing much the same. For anybody after me who does not have |
Looking into this, in the mean time |
@Cbkhare @jspc I'm having trouble reproducing this issue: kubebuilder/testdata/project-v3 master
❯ rm -rf bin
kubebuilder/testdata/project-v3 master
❯ ls bin
"bin": No such file or directory (os error 2)
kubebuilder/testdata/project-v3 master
❯ make controller-gen
mkdir -p /Users/rking/Projects/kubernetes-sigs/kubebuilder/testdata/project-v3/bin
GOBIN=/Users/rking/Projects/kubernetes-sigs/kubebuilder/testdata/project-v3/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0
kubebuilder/testdata/project-v3 master 2s
❯ rm bin/controller-gen
kubebuilder/testdata/project-v3 master
❯ ls bin
kubebuilder/testdata/project-v3 master
❯ make controller-gen
kubebuilder/testdata/project-v3 master
❯ make controller-gen
GOBIN=/Users/rking/Projects/kubernetes-sigs/kubebuilder/testdata/project-v3/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0
kubebuilder/testdata/project-v3 master 2s
❯ ls bin
controller-gen I tried this on both Linux and macOS with GNU Make 4.3. To help out, can I get:
The output from the original issue looks like the Makefile correctly calls the |
I am on Linux with
Make version 4.3 go env
Makefile tool install:
|
I hit a later issue with kustomize as well: Instead, I moved forward with: |
@jaypoulz 1.18 is not supported yet. |
Ahhhh, there's your problem. Operator SDK does not have a release yet that includes the new version of kubebuilder, which means the Makefiles still have the old way of installing tools with |
go 1.17 seems to be working. Worth noting that the default version on fedora is 1.16, so I hit (kubernetes-sigs/controller-tools#643 first). It may be worth making a note in the install docs about the golang version if it's possible to be burned both ways. Maybe it's there and I missed it. 😅 |
Fantastic! Its listed that we support go 1.17, but probably should be more explicitly called out since the error is so non-obvious. Can you confirm this works for you and close the issue @Cbkhare |
The golang version supported is defined in the docs and release page, see: https://book.kubebuilder.io/quick-start.html#prerequisites So I am closing this one. |
i have same error but when init project |
What broke? What's expected?
There are 2 problems I have observed, and I believe both of them are related to controller-gen. For some reason,
controller-gen
is not getting build up in$LOCALBIN
(check make file)ls
on. the localbin says, not such file or directory.copy controller-gen from the GOPATH/bin to LOCALBIN
I am not sure how much feasible it is,
Reproducing this issue
No response
KubeBuilder (CLI) Version
3.4.1
PROJECT version
version: "3"
Plugin versions
Other versions
sigs.k8s.io/controller-runtime v0.11.2
go version go1.17.1 darwin/amd64
Extra Labels
No response
The text was updated successfully, but these errors were encountered: