Bug in docs around component config and using a custom type #3418
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/documentation
Categorizes issue or PR as related to documentation.
What broke? What's expected?
I found a problem trying to switch my project to component config. I need to provide a custom type as I'd like to configure further facets of my operator using this mechanism.
The documentation suggests that a custom type needs to be registered with the scheme in
main.go
. If I do this manager startup fails with:If I do not register my custom type with the scheme the new type deserializes correctly and everything works.
Some feedback on the component config process and potentially improving the docs. The docs suggest creating a new API for the config using kubebuilder. This forces the user to turn the project into a multi-group project. This seems to be unnecessary since the type does not need to be registered with the scheme. It might be simpler for the user to just plop a config struct somewhere in their codebase manually ?
Reproducing this issue
Create a hello world operator with kubebuilder, follow the docs exactly to enable component config and add a custom type. Deploy the operator somewhere.
KubeBuilder (CLI) Version
3.10.0
PROJECT version
v1
Plugin versions
- go.kubebuilder.io/v4-alpha
Other versions
1.20.4
sigs.k8s.io/controller-runtime v0.14.1
Extra Labels
/kind documentation
The text was updated successfully, but these errors were encountered: