-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use operator-sdk binary as operator binary for helm and ansible #860
Comments
That could work. The main disadvantage I see is that the binary would be larger. The ansible operator binary is currently ~38M, helm is ~52M, and the SDK is ~56M. This change might also increase the size of the sdk binary compared to what it is now. Other than the size though, it would be nice having a single binary handle the sdk, go, ansible, and helm and not require separate code for the base images. |
I like this idea. IMO the binary size differences don't outweigh the benefit of having one binary, one lifecycle, and one implementation of each of the operators' entrypoints. And if I understand correctly, the SDK binary shouldn't grow much (if at all) since it already contains the @mhrivnak Would you envision the CLI to be explicit (e.g. |
👍 on the explicit for me as well |
Since all the type-specific code is already compiled in the sdk binary for use by "up local", I think there would be very little change in size after adding this command. |
Yeah, looking at the This seems like a good idea to me. It would make maintaining the code and images simpler. |
@mhrivnak @joelanford do we expect users to use the
If that's the case then we should clarify in the CLI guide and CHANGELOG that users should still use |
@hasbro17 I still expect
👍 |
My understanding:
|
@hasbro17 if there's anything about the naming or the UX you'd like to change, I'm very happy to chat about that, and we can always revise it. Mostly we needed this capability to land quickly so we can nail down the build process for ansible operators. |
Feature Request
Is your feature request related to a problem? Please describe.
The ansible operator and helm operator each need to build their own binary that will be run in production. Currently each type has to maintain (almost certainly in a separate repo) its own
main.go
,Gopkg.toml
,Gopkg.lock
, etc and facilitate a build and test workflow. The code inmain.go
overlaps with theoperator-sdk up local
feature.Even if we use scaffolds inside the operator-sdk repo to generate all of the above files, their rendered artifacts still need to be maintained somewhere for reproducible builds.
Perhaps most importantly, the above workflow necessarily requires that each binary has its own lifecycle. Each would have its own versioned releases (even if we version them in lock-step), including features, bugs, bug fixes, vendored dependencies (hopefully a subset of what's in operator-sdk), etc.
Describe the solution you'd like
Since all the functionality of helm and ansible operators is already built into the
operator-sdk
binary, I propose that we add a command that simply runs the correct operator. It will be very similar toup local
, but without the "local" parts. Some options that come to mind are:operator-sdk up
operator-sdk run
With this capability, the operator-sdk binary itself can remove the need to build separate binaries. There will be one binary with one lifecycle.
The text was updated successfully, but these errors were encountered: