What broke (please include exact error messages if you can)
When I ran kubebuilder create api and generated resources and controller code, it created a file controllers/suite_test.go. Inside this file, there are the following lines of generated code.
var _ = BeforeSuite(func(done Done) {
logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
...
In the latest version of controller-runtime (v0.7.0-alpha.6), there is no LoggerTo in the zap pkg: https://github.com/kubernetes-sigs/controller-runtime/blob/v0.7.0-alpha.6/pkg/log/zap/zap.go
What did you expect to happen? What do you think went wrong?
Expected generated code to compile correctly with correct logger references.
What versions of software are you using? Specifically, the following are often useful:
kubebuilder version) and scaffolding version (check your PROJECT file)Version: version.Version{KubeBuilderVersion:"2.3.1", KubernetesVendor:"1.16.4", GitCommit:"8b53abeb4280186e494b726edf8f54ca7aa64a49", BuildDate:"2020-03-26T16:42:00Z", GoOs:"unknown", GoArch:"unknown"}version: "2"go.mod file)kubectl version against your API server)Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T21:51:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-14T07:30:52Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
/kind bug
Hi @wfernandes,
The version which is scaffolded by KubeBuilderVersion:"2.3.1" is not using the v0.7.0-alpha.6. The only v3-alpha plugin uses that. See the doc: https://book.kubebuilder.io/quick-start.html#versions-and-supportability

And then, you can check here that the scaffolded changed for 0.7.0 already, See: https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v3/controllers/suite_test.go#L53. To try out the v3-alpha plugin you need to:
kubebuilder init --plugins=go/v3-alpha In this way, I am closing this as sorted out. However, feel free to ping us if you need or think that it should be re-opened.
Most helpful comment
Hi @wfernandes,
The version which is scaffolded by KubeBuilderVersion:"2.3.1" is not using the
v0.7.0-alpha.6. The only v3-alpha plugin uses that. See the doc: https://book.kubebuilder.io/quick-start.html#versions-and-supportabilityAnd then, you can check here that the scaffolded changed for 0.7.0 already, See: https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v3/controllers/suite_test.go#L53. To try out the v3-alpha plugin you need to:
kubebuilder init --plugins=go/v3-alphaIn this way, I am closing this as sorted out. However, feel free to ping us if you need or think that it should be re-opened.