Skip to content
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

Switch to discovery client for managed resources #200

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

sergenyalcin
Copy link
Member

Description of your changes

This PR switches to discovery client for getting managed resources

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

@sergenyalcin sergenyalcin self-assigned this May 9, 2023
@turkenh
Copy link
Member

turkenh commented May 16, 2023

Crosslinking a provider-kubernetes PR that could be related here: crossplane-contrib/provider-kubernetes#116

I couldn't have a chance to dive deep yet but just wanted to share in case they are related.

Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sergenyalcin, lgtm. The discovery client based implementation will also help us for discovering API resources of a given category category such as the managed resources. We need this functionality to implement certain migration scenarios involving provider families as their migration targets.

Let's iterate on this discovery-client based implementation so that we make use of the meta.RestMapper interface. The problem we are addressing here is correctly determining the GVR for the given GVK and RestMapper implementations have the RestMapping and RestMappings methods that we can use to convert the GVK to GVR instead of manually filtering the discovered API groups.

@sergenyalcin sergenyalcin merged commit 48477c8 into crossplane:main Jun 8, 2023
@sergenyalcin sergenyalcin deleted the migration-discovery branch June 8, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants