-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Manager Flag Error: flag provided but not defined: -config #2918
Comments
Hi @nikfot, Did you follow the tutorial and enable the component config (https://book.kubebuilder.io/component-config-tutorial/tutorial.html) to be able to use it? Also, you probably did not scaffold the project with version 3.6.0. Am I right? Note that the we had a bug fix to not scaffold the component config manifest without use the flag to properly init the project with, see: operator-framework/operator-sdk#5884 |
Hi @camilamacedo86 , |
HI @nikfot, You need to follow the tutorial and change your scaffold to work with. Then, if you scaffold the project with previous versions or 3.6.0 you must follow the tutorial to enable this feature in your project. (https://book.kubebuilder.io/component-config-tutorial/tutorial.html), If you create the project with old versions then you have scaffold files related to it but you might not have all of them. So, just check the tutorial and ensure that you properly enable the feature + have the scaffolds update as described in the steps to do that manually. On top of that, please ensure that you check the fix as well: #2778 |
I am closing this one as sorted out. Thank you. |
Thanks @camilamacedo86 for the quick answers! |
What broke? What's expected?
The flag --config is applied in manager config patch but does not exist in the flag declaration inside main.go.
Reproducing this issue
If you leave this uncommented in config/default/kustomization.yaml :
and it gets patched, then when deploying
The pod stays in crashloopbackoff state with this log:
By taking a look into main, I can see those flags get parsed:
But no --config flag.
It can be easily resolved by commenting out the patch. But I am opening the issue in case it causes confusion to someone.
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"v3.6.0", KubernetesVendor:"unknown", GitCommit:"f20414648f1851ae97997f4a5f8eb4329f450f6d", BuildDate:"2022-08-24T11:13:19Z", GoOs:"linux", GoArch:"amd64"}
PROJECT version
3
Plugin versions
Other versions
Go Version
go mod:
Kubectl Version
Extra Labels
No response
The text was updated successfully, but these errors were encountered: