Generate alpha command do not respect API namespacing #3969
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
What broke? What's expected?
When running
kubebuilder alpha generate
with a project containing a non-namespaced cluster, the command does not set the argument--namespaced=false
.I think the issue is this part of the function getAPIResourceFlags :
Which assumes namespaced=false is the default, which cause all the resources to be namespaced.
I would be happy to propose a fix !
Reproducing this issue
When running
kubebuilder alpha generate
with the following PROJETC :The following command is logged
kubebuilder create api --plural myresources --group core --version v1alpha1 --kind MyResource --resource --controller
which generates the following PROJECT :As you can see, api.namespaced which was absent (false) before is now true.
KubeBuilder (CLI) Version
4.0.0
PROJECT version
3
Plugin versions
go.kubebuilder.io/v4
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: