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

"kubebuilder init" command changed go 1.15 in go mod becomes 1.16 #2292

Closed
lightjw opened this issue Aug 11, 2021 · 3 comments
Closed

"kubebuilder init" command changed go 1.15 in go mod becomes 1.16 #2292

lightjw opened this issue Aug 11, 2021 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@lightjw
Copy link

lightjw commented Aug 11, 2021

What broke? What's expected?

"kubebuilder init" command changed go 1.15 in go mod becomes 1.16 .
but,my env only 1.15

quick-start of official doc :
image

go version go1.15.15 linux/amd64

before execute kubebuilder init, go.mod :

module guestbook

go 1.15

after execute kubebuilder init, go.mod :

module guestbook

go 1.16

require sigs.k8s.io/controller-runtime v0.8.3

kubebuilder init log:

Writing kustomize manifests for you to edit...
Writing scaffold for you to edit...
Get controller runtime:
$ go get sigs.k8s.io/controller-runtime@v0.8.3
Update dependencies:
$ go mod tidy
go mod tidy: go.mod file indicates go 1.16, but maximum supported version is 1.15
Error: failed to initialize project: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v3": exit status 1
Usage:
  kubebuilder init [flags]

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

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


Flags:
      --component-config         create a versioned ComponentConfig file, may be 'true' or 'false'
      --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

2021/08/11 15:28:31 failed to initialize project: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v3": exit status 1

Reproducing this issue

  1. mkdir guestbook
  2. cd guestbook/
  3. go mod init guestbook
  4. kubebuilder init

KubeBuilder (CLI) Version

3.1.0

PROJECT version

No response

Plugin versions

No response

Other versions

go version go1.15.15 linux/amd64

GOROOT=/usr/local/go
GO111MODULE=auto

Extra Labels

No response

@lightjw lightjw added the kind/bug Categorizes issue or PR as related to a bug. label Aug 11, 2021
@lightjw lightjw changed the title "kubebuilder init" command changed go 1.5 in go mod becomes 1.6 "kubebuilder init" command changed go 1.15 in go mod becomes 1.16 Aug 12, 2021
@swiftslee
Copy link
Contributor

ref #2257

@rashmigottipati
Copy link
Contributor

@011d As you are on Kubebuilder version 3.1.0, the go version needs to be v1.16+. Below are the updated prerequisites from the quickstart documentation:

Screen Shot 2021-08-23 at 7 49 45 PM

https://book.kubebuilder.io/quick-start.html

@rashmigottipati
Copy link
Contributor

Closing this issue as we think it's been solved with the cherry-picked PR. Please feel free to re-open this issue if it still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants