-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
What do you want to happen?
Currently, kubebuilder scaffolding expects the manager’s main.go
to be located at the root of the cmd
directory (cmd/main.go
). This assumption limits flexibility when structuring projects according to standard Go project layouts.
For example, if I want to add additional commands (e.g., CLI tooling), I would like to place them in their own subdirectories under cmd/
, such as:
cmd/
manager/
main.go
foocli/
main.go
To support this structure, I propose adding a --main-file
flag (e.g., --main-file=cmd/manager/main.go
) to allow the main manager entry point to be specified explicitly during scaffolding or plugin operations.
Additionally, this path could be recorded in the PROJECT
config file to persist the custom layout and support tooling/codegen accordingly.
Would the maintainers be open to a PR adding this feature?
Extra Labels
No response