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

Initializing a project does not work with 3.3.0 #2488

Closed
antonincms opened this issue Jan 19, 2022 · 4 comments · Fixed by #2489
Closed

Initializing a project does not work with 3.3.0 #2488

antonincms opened this issue Jan 19, 2022 · 4 comments · Fixed by #2489
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@antonincms
Copy link
Contributor

antonincms commented Jan 19, 2022

What broke? What's expected?

I don't know if it is a corner-case related to some of my config, or some kind of PEBCAK because it seems so big,
but when I try to initialize a new project it simply fails for me (cf Reproducing this issue).

Reproducing this issue

me@t490:~$ mkdir -p ~/projects/guestbook
me@t490:~$ cd ~/projects/guestbook
me@t490:~$ kubebuilder init --domain my.domain --repo my.domain/guestbook
Writing kustomize manifests for you to edit...
Writing scaffold for you to edit...
Get controller runtime:
$ go get sigs.k8s.io/controller-runtime@v0.11.0
# sigs.k8s.io/json/internal/golang/encoding/json
../../go/pkg/mod/sigs.k8s.io/json@v0.0.0-20211020170558-c049b76a60c6/internal/golang/encoding/json/encode.go:1249:12: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)
../../go/pkg/mod/sigs.k8s.io/json@v0.0.0-20211020170558-c049b76a60c6/internal/golang/encoding/json/encode.go:1255:18: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)
Error: failed to initialize project: unable to scaffold with "base.go.kubebuilder.io/v3": exit status 2

KubeBuilder (CLI) Version

Version: main.version{KubeBuilderVersion:"3.3.0", KubernetesVendor:"1.23.1", GitCommit:"47859bf2ebf96a64db69a2f7074ffdec7f15c1ec", BuildDate:"2022-01-18T17:03:29Z", GoOs:"linux", GoArch:"amd64"}

PROJECT version

The project is not scaffolded yet.

Plugin versions

The project is not scaffolded yet.

Other versions

me@t490:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish

me@t490:~$ go version
go version go1.16.12 linux/amd64

me@t490:~$ kubectl version --client
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}

Extra Labels

No response

@antonincms antonincms added the kind/bug Categorizes issue or PR as related to a bug. label Jan 19, 2022
@antonincms antonincms changed the title Initializing a project does not work Initializing a project does not work with 3.3.0 Jan 19, 2022
@camilamacedo86
Copy link
Member

Hi @antonincms,

The problem is the go version. You must use go 1.17 with 3.3.0+
Can you please upgrade the go version installed and check it out?

@antonincms
Copy link
Contributor Author

antonincms commented Jan 19, 2022

Hi Camila !

Indeed, that also match with what I found about my error messages.
This isn't documented in the quick-start prerequisites, I guess it should ?

@camilamacedo86
Copy link
Member

Hi @antonincms,

That is true, We did not updated : https://book.kubebuilder.io/quick-start.html

Screenshot 2022-01-20 at 14 00 51

Could you help us by pushing a PR to fix that?
We also need to cherry-pick it to the branch book-v3.

@antonincms
Copy link
Contributor Author

antonincms commented Jan 20, 2022

Could you help us by pushing a PR to fix that?

I will, but I'm waiting on a ticket about my CLA !

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

Successfully merging a pull request may close this issue.

2 participants