This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
Use a single binary to run the different Operator processes #252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We currently run three containers with the Operator package,
I initially created one binary for each one of these, but we can merge them into a single binary, and use a subcommand to run it on any of these modes. The difference between them is which reconcilers are started.
I'm calling the subcommands respectively,
operator
webhook-bootstrapper
webhook-server
So, if you run the Operator locally, it would be like,
Finally, I'm removing the
add_***.go
files that are created by the operator-sdk's scaffolding, and instead using a list oncmd/manager/operator.go
. The idea here is that we don't really use scaffolding and just copy/paste for new reconcilers, and having a simple list is more clear than depending on the behavior ofinit()
functions. The webhook processes are already just adding specific reconcilers, so we would get some consistency.