-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Since #334 we have catalogd's CatalogMetadata APIs available for operator-controller.
As mentioned in #334:
The
CatalogMetadataAPI contains (almost) all of the FBC that the eventual catalogd file server will, so it is a good step forward, and is something that folks implementing some of the existing RFCs can use right now. This will ease an eventual migration to the catalogd file server.
As part of this issue we want to switch existing code to use CatalogMetadata and address the following to do:
operator-controller/cmd/resolutioncli/entity_source.go
Lines 120 to 125 in fd7cfb5
| // TODO: Reduce code duplication: share a function with catalogdEntitySource (see getEntities) | |
| // We don't want to maintain two functions performing conversion into input.EntityList. | |
| // For this we need some common format. So we need a package which will be able | |
| // to convert from declfcg structs into CRD structs directly or via model.Model. | |
| // One option would be to make this piece of code from catalogd reusable and exportable: | |
| // https://github.com/operator-framework/catalogd/blob/9fe45a628de2e74d9cd73c3650fa2582aaac5213/pkg/controllers/core/catalog_controller.go#L200-L360 |
But instead of converting declcfg into CRDs as initially suggested in the TODO we will operate on declcfg in both operator-controller and resolution CLI.
It will make supporting resolution CLI a bit easier.