Skip to content
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

unable to scaffold with "base.go.kubebuilder.io/v4": exit status 1 #203

Open
lanss315425 opened this issue May 27, 2024 · 0 comments
Open

Comments

@lanss315425
Copy link

我执行kubebuilder init --domain demo报如下错误:

INFO Writing kustomize manifests for you to edit... 
INFO Writing scaffold for you to edit...          
INFO Get controller runtime:
$ go get sigs.k8s.io/[email protected] 
sigs.k8s.io/controller-runtime imports
	sigs.k8s.io/controller-runtime/pkg/builder imports
	sigs.k8s.io/controller-runtime/pkg/predicate imports
	maps: package maps is not in GOROOT (/opt/homebrew/Cellar/[email protected]/1.19.12/libexec/src/maps)
sigs.k8s.io/controller-runtime imports
	k8s.io/apimachinery/pkg/apis/meta/v1 imports
	k8s.io/apimachinery/pkg/labels imports
	k8s.io/apimachinery/pkg/util/sets imports
	cmp: package cmp is not in GOROOT (/opt/homebrew/Cellar/[email protected]/1.19.12/libexec/src/cmp)
Error: failed to initialize project: unable to scaffold with "base.go.kubebuilder.io/v4": exit status 1
Usage:
  kubebuilder init [flags]

Examples:
  # Initialize a new project with your domain and name in copyright
  kubebuilder init --plugins go/v4 --domain example.org --owner "Your name"

  # Initialize a new project defining a specific project version
  kubebuilder init --plugins go/v4 --project-version 3


Flags:
      --domain string            domain for groups (default "my.domain")
      --fetch-deps               ensure dependencies are downloaded (default true)
  -h, --help                     help for init
      --license string           license to use to boilerplate, may be one of 'apache2', 'none' (default "apache2")
      --owner string             owner to add to the copyright
      --project-name string      name of this project
      --project-version string   project version (default "3")
      --repo string              name to use for go module (e.g., github.com/user/repo), defaults to the go package of the current working directory.
      --skip-go-version-check    if specified, skip checking the Go version

Global Flags:
      --plugins strings   plugin keys to be used for this subcommand execution

FATA failed to initialize project: unable to scaffold with "base.go.kubebuilder.io/v4": exit status 1 

执行步骤:

mkdir demo
cd demo
go mod init demo  
kubebuilder init --domain  demo

环境:

go version
go version go1.19.12 darwin/arm64

kubebuilder version
Version: main.version{KubeBuilderVersion:"4.0.0", KubernetesVendor:"1.27.1", GitCommit:"6c08ed1db5804042509a360edd971ebdc4ae04d8", BuildDate:"2024-05-24T08:36:23Z", GoOs:"darwin", GoArch:"arm64"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant