-
Notifications
You must be signed in to change notification settings - Fork 32
Controller generator #506
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
Controller generator #506
Conversation
a78704f to
e50b078
Compare
97957e8 to
b0cb9fc
Compare
|
I've used this generator to work on the FWIW, this generator is a HUGE time saver when working on new controllers. |
There were a few additional resources we could generate based on the list of resources passed to the generator. Let's do this. It minimizes the needed steps when working on new controllers, and makes contributions easier.
Run `make generate-resources`. Left it in a separate commit to see that the files under the control of the generator didn't change in any meaningful way.
For new controllers, we need to re-generate the OLM bundle manifest so that it knows about the new CRDs. We now have a dedicated `generate-bundle` target for it. We could it a dependency of the `generate` target so that it's always up-to-date and checked in CI via the `verify-generated` target, however I think it's a bad idea because it would mean installing the operator-sdk in every CI run which is costly for no real gain: the manifest is always generated (and thus up-to-date) when building the OLM bundle.
Introduce a controller scaffolding tool that does most of the heavy work when writing a new controller. It asks a series of questions, then generates stubs for the API, controller implementation, tests and client code.
b0cb9fc to
5c76eac
Compare
|
I'm going to merge this, as other PRs depend on it. If there are adjustment to make, we can do them in follow-up PRs. |
Add a controller scaffolding tool that does most of the heavywork when writing a new controller. It asks a series of questions, then generates stubs for the API, controller implementation, tests and client code.
To run the scaffolding tool: