-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
What broke? What's expected?
Users should have the scaffold of https://github.com/kubernetes-sigs/kubebuilder/blob/master/docs/book/src/component-config-tutorial/testdata/project/config/manager/controller_manager_config.yaml ONLY/when they create the project following the tutorial: https://book.kubebuilder.io/component-config-tutorial/api-changes.html
That means, the scaffold should only be done when we run kubebuilder init --domain tutorial.kubebuilder.io --component-config
. However, it has been added to the default scaffolds when we run kubebuilder init
and it has brought confusion since users do not understand how properly use it and that their code in the main.go also needs to be customized accordingly.
Reproducing this issue
Examples:
- 📖 documentation Fixes ProjectConfig from ControllerManagerConfig in the component-con… #2778
- Attempt to use manager_config_patch.yaml results in "flag provided but not defined: -config" operator-framework/operator-sdk#5884
KubeBuilder (CLI) Version
3.5.0
Plugin versions
Therefore, these options would fit in a plugin and should not be a flag. It is only a flag because it was implemented in the past (Kubebuilder 2.X) before the plugin design was introduced.
-
Proposed changes (Bug FIX)
a) Ensure that the component config scaffolds are not done by default and are only done when the flag is used - 🐛 (kustomize/v1 and kustomize/v2-alpha) : ComponentConfig scaffolds should not be done by default #2826
b) Review the documentation and ensure that it proper clarifies how it should be used and work - done -
Proposed changes in the long term (RFE)
a) Deprecated the flag
b) Move ComponentConfig behaviour to a plugin that can be used in the init/edit subcommands.