-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 go/v4 plugin does create expected folder structure #3154
Comments
Hi @Sijoma, You are using the master branch. The master branch has a breaking change for the go/v4-alpha plugin : #2985 If you are using the master branch and you have a project that was scaffolded before then, you need to manually change the layout with the steps: https://github.com/camilamacedo86/kubebuilder/blob/05761309d74c1fd5216db629b791af55c47099bf/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md#migrate-the-layout-version-into-the-project-file When we do a new release we will need to add the info as well in the release notes. Note that the next step will be stabilize the alpha plugin and then we will no longer able to introduce breaking changes for the go/v4-alpha. it will become to be go/v4 only and at some point the default layout. |
I was actually trying to do the migration by creating a new project (see reproduction steps). I think that was also mentioned in the documentation. Should it work there? Sidenote: I was a bit suprised that its the master branch build (used install steps of the documentation and I saw the version number 3.8.0). |
Hi @Sijoma, So, let's step by step. Following the comments inline.
The link that I passed is from master branch it is NOT published yet. The version 3.8.0 released does not have the changes #2985 and the doc also does not have this info, see: https://book.kubebuilder.io/migration/v3vsv4.html
If you are using the release 3.8.0 then the changes done in.the PR #2985 are not there. I would recommend wait the next release it will be done soon OR use master branch if you wish. |
Ahh thanks @camilamacedo86 now I got it. Appreciate that you took the time to explain it 👍 . So I guess all good and the issue can be closed. |
What broke? What's expected?
The folder layout is not working as expected when using the go/v4-alpha plugin.
Note the "api" folder is still named "apis" and there is no internal folder for the controllers.
Another notable things why it broke first was that I had missing "--" copied from the kubebuilder book. PR to fix this is here: #3153
However, I cannot make the new folder structure work.
Reproducing this issue
kubebuilder init --domain my.domain --plugins=go/v4-alpha
kubebuilder edit --multigroup=true --plugins=go/v4-alpha
kubebuilder create api --group group --version v1alpha1 --kind MyKind --namespaced=false --plugins=go/v4-alpha
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:“3.8.0”, KubernetesVendor:“unknown”, GitCommit:“184ff7465947ced153b031db8de297a778cecf36”, BuildDate:“2022-12-02T15:43:53Z”, GoOs:“darwin”, GoArch:“arm64"}
PROJECT version
New project
Plugin versions
Other versions
go version go1.19.4 darwin/arm64
go env:
Extra Labels
No response
The text was updated successfully, but these errors were encountered: