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
I am getting the following error when my container (base image is FROM golang:1.12.0 or 1.12.+) performs the following command via one of the Makefile sections: go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd. The error I get is:
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd
-: build constraints exclude all Go files in /go/src/github.com/k8snetworkplumbingwg/kubemacpool
Error: not all generators ran successfully
run `controller-gen crd -w` to see all available markers, or `controller-gen crd -h` for usage
exit status 1
(btw if I change the image back to golang 1.11.9 then the issue does not occur.)
I think the issue is related to the fact that controller-gen is installed via build constraint //+build, as this was insinuated in the following links: golang/go#31661 and golang/go#29268 (comment).
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd rbac:roleName=kubemacpool paths=./pkg/... output:crd:dir=config/ output:stdout
ensure file hack/tools.go content, there must a new empty line after the// +build tools comment
// +build tools/*...license...*/// This package imports things required by build scripts, to force `go mod` to see them as dependenciespackage tools
import _ "k8s.io/code-generator"
I am getting the following error when my container (base image is FROM golang:1.12.0 or 1.12.+) performs the following command via one of the Makefile sections:
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd
. The error I get is:(btw if I change the image back to golang 1.11.9 then the issue does not occur.)
I think the issue is related to the fact that controller-gen is installed via build constraint //+build, as this was insinuated in the following links: golang/go#31661 and golang/go#29268 (comment).
Do you have any idea how to handle it?
Environment:
Go Version:
go version go1.12.15 linux/amd64
The text was updated successfully, but these errors were encountered: