Skip to content

Refactor catalogsource controller and entitysource to be implementations of generic interfaces #173

@anik120

Description

@anik120

Motivation:

Operator Catalog content from index images are converted into Entities (and variables) for deppy. However, right now the information needed for creation of Entities is fetched from a single, hardcoded source (OLM v0 grpc pods provided by v0 CatalogSources). The entitysource catalogsource is an implementation of an interface named GrpcClient, which makes the assumption that an entity source can only be a grpc client.

Also, there is a controller called catalogsource_controller, whose purpose is to build and maintain a cache of Entities for feeding to deppy, but it too makes the assumption that a CatalogSource will always be the sole provided of information needed to build Entities.

Goals:

Refactor to pave the way for different entity sources (eg OLM v1 catalogd, I.e pave the way for #161)

  • Since the catalogsource_controller is essentially a cache builder (and not a controller for catalogsource CRs), the catalogsource_controller should be refactored to be an entity_cache_builder
  • EntitySources should be refactored such that entitySourceConnectors are implementations of a EntitySourceConnector, so that the entity_cache_builder can use any of the EntitySourceConnector to connect to an entity source and fetch information from, in order to build the cache.

Metadata

Metadata

Assignees

Labels

kind/designCategorizes issue or PR as related to design.

Type

No type

Projects

Status

Implementing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions