-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
cmd/.../gen-csv: use --include
instead of CSV config
#2249
cmd/.../gen-csv: use --include
instead of CSV config
#2249
Conversation
config flag, add exclude flag doc: remove CSVConfig documentation, update CLI docs internal/generate/util: add Config type and helper internal/scaffold/olm-catalog: replace CSVConfig with genutil.Config and update related code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@estroz I loved it 👍 Much easier and intuitive to be used and low code complexity.
The code is great 🥇
Just a few nits
- missing the CHANGELOG.
- Could you add an example over how to populate it to make simpler for the users? Could you add in this example 2 paths to show what character should be used to split them? I think it would be great in the usage description of the command. In this way, they do not really need to check the docs. (
Added suggestions
) - a test using the exclude option.
Hi @estroz, IHMO this PR 100% great and make the process very easier for the users. So, because of this, I think that may be valid we add here in this pr a flag to pass the path as well when the operator is no-SDK one. E.g ( --path= which by default will be the SDK layout but if informed should use the dir passed as arg ) OR Keep the config just for no-sdk operators? c/c @joelanford |
hi @estroz This change makes things simpler when there's an operator that uses Operator-SDK. I was trying to use It is not an Operator-SDK based operator. What do you think? I think keeping the configuration options (operator-path, role-paths, crd-cr-paths properties in csv-config.yaml) is necessary. There are a lot of operators out there, which are not based on Operator-SDK but they still want to be in OperatorHub. Making this change IMO would make things harder for maintainers of these operators. Or, let's dump |
I would be happy to provide additional information, if you need anything. |
I agree with @aliok - keeping the existing I'd greatly appreciate to not remove the config flag |
@aliok @matzew thanks for your feedback. This is a breaking change so its great to hear community input. Part of the reason I want to remove the config file is that upcoming scaffold changes will likely include some kind of top-level configuration, which should not be modified often after it is added. However files required for CSV generation may change following that addition, and continue to change as CSV format is solidified (it is still The other part is CSV updates. Say I have an existing CSV Using a general CLI option for config fits both situations without many/any changes necessary going forward and therefore is more maintainable. Therefore I suggest an alternative
would include all files in @joelanford @camilamacedo86 @hasbro17 thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IHMO:
- +1 for as @estroz described we increment this with flags and may we will be able to indeed allow customizations via the makefile in the future.
- This change increases the maintenance ability and makes easier its usage for SDK projects.
Also, note that no-SDK projects users still able to use it for their projects. They just need to move a few for the same SDK layout structure until we are able to provide the future impls/options.
For me, it is /lgtm /approve
Going to hold this until I write up a proposal describing why CLI config is better than a file, and get feedback. /hold |
@estroz thanks very much for the long explanation.
That would be fine! Important bit I thing is the ability to define the inputs. As per @camilamacedo86 's comment:
Changing the layout of the Knative eventing operator for example, is not easy. We don't own that operator and I think there would be lots of objections if we want to move things. Overall, please keep in mind that projects might have different layouts and ability to override configuration would be very beneficial. Thanks for your efforts folks! |
--exclude
instead of CSV config--include
instead of CSV config
Looks great @estroz I can give it a try tomorrow. |
hi @estroz I gave it a try. My include path doesn't have "deploy/crds" but I receive this error:
When I remove I hope we won't need a new argument for the program. |
@aliok there's still some work that needs doing on this. Working on it now. I'd like to keep the number of flags to a minimum. Perhaps just having |
@estroz: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Upon looking into removing the config with an For now I will fix the config bug in a separate PR and place a hold on this PR. /hold |
@estroz |
Closing per #2249 (comment). Config removal will come when the CSV generator is updated before rewriting operator-sdk in kubebuilder plugin format. |
Description of the change:
--include
flagMotivation for the change:
CSVConfig
configuresolm-catalog gen-csv
to include data from certain files/dirs in the generation process. This config object may change significantly if we add/remove requirements for CSV generation in the future or users request more config fields. Instead of breaking config structure, the generator should look through all files in a default location to gather what data it needs to compile a CSV, including dirs/files passed in by--include=[list of paths]
.--include
is a generalization of specifying exact paths required, so we can get the same effect as a config with much less actual configuration. The default include path isdeploy/
.Closes #1346, closes #2266
Relates to #2201