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

Change the Reference.Type API with Reference.TerraformName #521

Merged

Conversation

sergenyalcin
Copy link
Collaborator

Description of your changes

This PR changes the Reference.Type API with Reference.TerraformName. This change is necessary to support the multiversion APIs.

The reference configuration API in upjet includes a Type field that identifies the target reference field through the Kubernetes Kind. When you configure a reference field using this Type API, it searches for the target reference resource in the same API version. However, if the specific API version lacks the target reference resource, the reference cannot be resolved. To address this, we will use the TerraformName API for configuring cross-resource references. This API allows the reference resolver to locate the target reference resource across its latest available version.

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.

How has this code been tested

Tested locally.

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
@sergenyalcin
Copy link
Collaborator Author

/test-examples="examples/cloudplatform/serviceaccount.yaml"

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.

Thank you @sergenyalcin, lgtm. I'll also deprecate the config.Resource.References[*].Type in crossplane/upjet#400.

@sergenyalcin sergenyalcin merged commit 8783951 into crossplane-contrib:main May 10, 2024
10 checks passed
@sergenyalcin sergenyalcin deleted the refactor-references branch May 10, 2024 09:14
This pull request was closed.
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.

2 participants