generate: add bundle subcommand for current project layouts#3088
Conversation
|
|
| @@ -0,0 +1,131 @@ | |||
| // Copyright 2020 The Operator-SDK Authors | |||
There was a problem hiding this comment.
Why do we need to create the legacy one? Is not it == the new one and just change the paths?
Is not harder to have the same implementation duplicated instead of having the code centralized to keep it maintained? WDYT? See: #2948 (comment)
PS.; My first approach was to do it as you did here, however, after some comments from @joelanford I think it makes more sense just change the path instead of it as he suggested.
There was a problem hiding this comment.
I'm of the opinion that some code duplication is OK, especially with complex command setup like this. It's easier to maintain, then remove when we remove current project layout support.
There was a problem hiding this comment.
I'm okay with duplication in this case as well. From my experience with trying to reuse the code for generate csv to be used by both the old and new CLI commands it made the underlying command a lot more convoluted.
@camilamacedo86 operator-sdk run local was a much simpler command where we just had to change 1 path.
717f474 to
0a5d435
Compare
|
We need a CHANGELOG fragment for adding this cmd to the existing CLI right? |
hasbro17
left a comment
There was a problem hiding this comment.
We'll need to add a CHANGELOG fragment but LGTM otherwise.
0a5d435 to
33535e9
Compare
Description of the change:
NewCmdLegacythat returns abundlesubcommand configured to generate bundles for current project layouts.GenerateLegacyandLegacyOptionto generate CSVs for legacy projects.Motivation for the change: current project layouts should have a
generate bundlecommand to differentiate between bundle and package manifests formats./cc @hasbro17 @jmrodri @camilamacedo86
/kind feature