Skip to content

add library functions for fetching service resources #213

@Diaphteiros

Description

@Diaphteiros

What would you like to be added:

There are several places where controllers need to know which services are installed on an MCP. Getting this information is a two-step process:

  1. Fetch all ServiceProvider resources from the platform cluster and gather their exposed resource GVKs.
  2. For each GVK found this way, check if it exists with the same name and namespace as the given MCP on the onboarding cluster.

Since this is required in multiple places, it would make sense to add functions for both steps to the openmcp-operator lib module.

An example implementation of gathering the GVKs can be found here (note that the code there includes fetching the corresponding CRDs).

  • Implement listing GVKs for all resources exposed by ServiceProvider resources in their status.resources field
  • (optional) Implement converting list of GVKs into list of corresponding CRDs (this is required for creating rbac rules based on the GVKs, as the CRDs contain the plural names of the respective resources)
  • Implement fetching existing services resources for a given MCP
  • Write tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/open-mcpAll ManagedControlPlane related issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions