-
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
Go CSV Markers to populate specDescriptors for "owned" CRDs from another module #6616
Comments
At a minimum, if this is the case, I would consider it a bug. Would you mind building a reproducer and filing a bug issue for that? |
I can amend to testdata dir perhaps |
@kaovilai Are you modifying the descriptions inside the bundle itself, or inside the config/ dir (where CRD bases are present). The bundle gets overwritten, unless it is explicitly set to false through the make bundle command. The issue with having markers on |
Inside config without getting overwritten by manifests generation |
currently. I think you can make it possible for operator-sdk to get that info from somewhere. |
In addition to a completely out of module CRDs, our structs also inherit some fields imported from other modules.. Would be great to be able to set x-descriptors for import "github.com/someotherthing/apis/v1"
struct MyOwnKind type {
ourField string
otherField v1.something
} |
I am proposing new flags to indicate external module
You can also add flag for creating relationship between them to link them together. |
How would operator-sdk know which field on that struct the marker is applied to? markers in go generally speaking have to be on the field that is to be Since the dependent module is open source, can't the descriptors be added there? or in a fork? That seems like the most logical way to go. |
ok even if we were able to add markers to x_types.go in other module, I doubt that the markers would have any effect on the CSV of this module since the only thing we're doing is copying over the CRD, not the .go files. |
To be clear, you do not reference the dependent operator in your |
We have a code dependency in our struct and is in go.mod, worse case we can do anonymous import |
This seems like a really strange use-case for an operator to me. OLM's job is to install operators and manage the CRD life-cycle, it seems less then ideal to have an operator install another operator and manage the dependent CRD's. OLM provides a |
|
This is our operator repo Our slack Workload we have maintainers and and fork to openshift (Not an operator):
We rebase often against upstream. Are you suggesting that in our fork we change module name etc and annotate We want to be "upstream first" and this upstream specifically do not incorporate "openshift specific quirks" including defaulting to operator-framework for operator packaging and discovery very often. |
Sounds like you're suggesting to create minimal velero operator that oadp-operator can then depend on. It's a very hackish approach as the repo upstream is not in a kubebuilder/v3 structure and will probably involve copying CRDs around into |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/lifecycle frozen |
Feature Request
A way to generate
specDescriptors
andstatusDescriptors
to CSV from CRD defined in _types.go in external module (ie. different go.mod) using markersDescribe the problem you need a feature to resolve.
We oadp-operator deploy CRDs that are not from the same Go module
github.com/vmware-tanzu/velero/
. Our go module isgit.luolix.top/openshift/oadp-operator
This means we are not able to add operator-sdk Go tags to the _types.go since the
github.com/vmware-tanzu/velero/
project is not operator-sdk specific.I have an issue when ...
make bundle
does not have a way to populate specDescriptors into CSV from out of module CRD. Defining specDescriptors manually also gets overwritten if I'm not mistaken.Usecase
So we can specify which x-descriptors applies to each field to customize the UI for a field in externally and non operator-sdk specific defined _types.go
https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md
Describe the solution you'd like.
A way to store define/generate specDescriptors into CSV dynamically from out of module _types.go or CRD. Perhaps by defining imported_types.go like following
/language go
The text was updated successfully, but these errors were encountered: