-
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
Generate a Cluster Service Version (CSV) from an Operator SDK project #900
Comments
@aravindhp @djzager I'm moving the discussion from #673 here. @aravindhp If we're going to add marketplace annotations by default, that change will go in another PR. @djzager as per your comment, you'd rather have the user add marketplace annotations than the SDK? |
Excellent idea. I feel awful for hopping onto your PR the way that I did. Just felt it was easier to make sure we were meeting in the middle before the PR was accepted (and discuss any potential future changes) than after. It may help you to know where I come from. I've been dabbling around in operator-sdk, specifically around getting the Ansible based Operators working well and then playing around with creating Ansible based Operators like this one. My actual work around Operators has been to get the Ansible Service Broker and Template Service Broker operators ready for 4.0. I want to do what I can to help make sure that operator-sdk makes it easy for users to both create their Operator (Helm, Go, Ansible) as well as make it available via Marketplace and OLM.
I view the SDK managing the marketplace annotations as a "nice to have". If the story for users is that they use operator-sdk to make their Operator and then generate the CSV, and there are instructions from Marketplace on specific annotations to add then I would find that workflow straightforward and I personally would have no complaints. Just don't clobber the annotations when I try to use operator-sdk to update the CSV 😄 I would like to try and add a little more detail to my original comment. While I am not wholly aware of the history of Operators + OLM and where CSVs were managed (please correct me if I am wrong), but this feels like a turning point where each project that wants to integrate with Marketplace (OLM via proxy) needs to manage their own CSVs. I suspect that as we move forward in time and, for example, I need to be able to test upgrade scenarios from one version of my Operator to another and I will want to have my older CSVs around to assist in testing and development. Knowing that operator-sdk is opinionated (and rightly so), I think now is the time to have the support for multiple versions in the
In practice I may only include the latest CSV in whatever payload I hand off to Marketplace but having 1) the standard layout for the Hope this helps. |
@djzager not a problem! Feel free to jump in on any PR you want. I figured it would be easier to track CSV discussion in an issue rather than a PR that (hopefully) will be merged soon. Everything discussed here will likely be in another PR, especially version management. The SDK team had a discussion a while ago about how the SDK would handle CSV file naming and versioning. We should rekindle the discussion here and now. There are arguments for two different versioning styles (listed in this comment in a previous PR):
I've seen at least one project manage CSV's in a scheme similar to the one you're suggesting (2), and I'm sure others do as well. I'd like to get to understand the advantages of doing so; in my (uninformed) opinion, |
I'll do my best to articulate why I think method (2) is the correct answer. Right now, the two Operators that I am directly involved in only have one version |
I have to echo this concern. Having to manually git checkout each version I'm interested in is not a great experience. |
@djzager @eriknelson Testing is really important to us, so unless the OLM has tool to manage CSV's for testing in this manner, which I don't think it does, I am inclined to implement (2). I had thought using |
@estroz Awesome. Thank you for tracking this as well as taking the steps necessary to make Operator integration easier. |
Jumping in a little late but I'm also in agreement with the above discussion that the SDK should generate a name versioned CSV file for each version e.g |
@dmesser posted the following in #990:
In the SDK's case, We do not generate an |
Another issue this brings up is how CRD's are handled by the SDK. Currently we generate one set of CRD's in |
@estroz Ideally a user would be able to just use the entire |
@dmesser we could implement a structure like |
/SGTM |
@aravindhp @djzager @dmesser @eriknelson now that #1016 is merged the SDK will version CSV's and CRD's as discussed here. I'll close this issue for now, and reopen it if you have followup questions or suggestions on the implementation. If you find any bugs feel free to open a new issue. Thanks for the help! |
A CSV allows an operator to be managed by the Operator Lifecycle Manager. The SDK should generate a CSV using manifests and code available in an operator project structurally similar to that generated by the SDK.
A design doc exists which contains design and implementation details.
This issue should be the source of truth for requests and suggestions regarding the CSV generation process.
Initial implementation: #673
The text was updated successfully, but these errors were encountered: