You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but , when I try to install the operator by running command "make install" ,I got following error :
/Users/jeremyzhang/go-workspace//bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
main.go:29:2: package cronjob/api/v1 is not in GOROOT (/usr/local/go/src/cronjob/api/v1)
Error: not all generators ran successfully
run `controller-gen crd:trivialVersions=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -w` to see all available markers, or `controller-gen crd:trivialVersions=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -h` for usage
I have to put my project under /usr/local/go/src/cronjob ?
my project path is : /Users/jeremyzhang/go-workspace/src/cronjob
here is my env: export GOPATH=/Users/jeremyzhang/go-workspace/ # don't forget to change your path correctly! export GOROOT=/usr/local/go/ export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin export PATH=$PATH:/usr/local/kubebuilder/bin
and here is the version :
kubebuilder version Version: version.Version{KubeBuilderVersion:"2.3.1", KubernetesVendor:"1.16.4", GitCommit:"8b53abeb4280186e494b726edf8f54ca7aa64a49", BuildDate:"2020-03-26T16:42:00Z", GoOs:"unknown", GoArch:"unknown"}
go version: go version go version go1.14.5 darwin/amd64
The text was updated successfully, but these errors were encountered:
When you create the project, if you are working with it outside of the GOPATH you need to provide the --repo. The repo will be used to gen the go modules. See the information in : https://book.kubebuilder.io/quick-start.html#not-in-gopath as the link for the Go doc.
Shows that when you run the makefile target the controller-tools is unable to generate the code because the go modules path is not accurate.
Also, note that the project officially only supports 1.13 go version and not 1.14.
I am closing this one since shows that all required info about how you can work with go modules are provided above. However, feel free to re-open it if you see that still required.
When you create the project, if you are working with it outside of the GOPATH you need to provide the --repo. The repo will be used to gen the go modules. See the information in : https://book.kubebuilder.io/quick-start.html#not-in-gopath as the link for the Go doc.
Shows that when you run the makefile target the controller-tools is unable to generate the code because the go modules path is not accurate.
Also, note that the project officially only supports 1.13 go version and not 1.14.
I am closing this one since shows that all required info about how you can work with go modules are provided above. However, feel free to re-open it if you see that still required.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Hi , I try to follow the https://book.kubebuilder.io/cronjob-tutorial/running.html to create the cronjob operator
but , when I try to install the operator by running command "make install" ,I got following error :
I have to put my project under /usr/local/go/src/cronjob ?
my project path is :
/Users/jeremyzhang/go-workspace/src/cronjob
here is my env:
export GOPATH=/Users/jeremyzhang/go-workspace/ # don't forget to change your path correctly! export GOROOT=/usr/local/go/ export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin export PATH=$PATH:/usr/local/kubebuilder/bin
and here is the version :
kubebuilder version Version: version.Version{KubeBuilderVersion:"2.3.1", KubernetesVendor:"1.16.4", GitCommit:"8b53abeb4280186e494b726edf8f54ca7aa64a49", BuildDate:"2020-03-26T16:42:00Z", GoOs:"unknown", GoArch:"unknown"}
go version:
go version go version go1.14.5 darwin/amd64
The text was updated successfully, but these errors were encountered: