-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Kubebuilder support for controller flags / command line arguments #611
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
Comments
/cc @DirectXMan12 |
this is a known issue with the current scaffolded code. we're working to change the scaffolding to provide a simpler model that's more amenable to this usecase. |
Thanks guys, is there a different issue for this feature that I should track? or can I track this issue? |
#588 is the base issue, and I'll make sure everything gets linked in there. |
Hi, is there any progress? We are looking forward to the awesome feature! Is there anything I can do to help you? |
We've got work in process, but it'll take a bit to overhaul our generation system so that we don't break existing users. cc @droot |
@gaocegege This is still in progress #632. You can refer to to the simplified scaffolding design , it will give you an overall idea about the approach. |
Thanks, I will take a look! 🎉 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Closing this since 2.0.0 includes new scaffolding structure which makes it easy to setup reconciler. |
Thanks, I tried the new scaffolding and it works for me. |
@droot or @gaocegege can y'all point me to an example where I can provide flags to my controller like the OP mentioned? |
In my project I just used go flags like this:
|
@CamelCaseNotation You can define flags like https://github.com/gaocegege/ray-operator/blob/master/main.go#L50 and use them in your reconcile initialization. |
Uh oh!
There was an error while loading. Please reload this page.
I am trying to find a way to pass command line flags to my generated controller, is there an established pattern for doing so without making too many changes to scaffolded code?
My use case is very simple, I would like to mount a config map on the controller as part of the installation, and pass a command line flag that provides that path to the controller so that it can load it (prefer to not hardcode that path) - this is a standard pattern in kubernetes controllers - as well as passing other flags that make sense for your controller.
Is there some way to do this with kubebuilder?
from what I can see,
main.go
(manager) does not provide an straightforward way to pass flags to my generated controller/reconciler code.The text was updated successfully, but these errors were encountered: