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

Support generating reference resolvers targeting multiple types #38

Open
wwentland opened this issue Feb 23, 2022 · 4 comments
Open

Support generating reference resolvers targeting multiple types #38

wwentland opened this issue Feb 23, 2022 · 4 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@wwentland
Copy link

wwentland commented Feb 23, 2022

What problem are you facing?

It is currently not possible to generate ResolveReferences methods that target multiple suitable types even though there are cases in which this would be desirable.

A good example for this are references to KMS CMKs and Aliases in AWS.

Either can be used as reference in a SQS Queue's kmsMasterKeyId and Crossplane should support both.

How could Crossplane help solve your problem?

Resolving of references to KMS Keys for Queues has been implemented in the following way:

// KMSMasterKeyID - The ID of an AWS-managed customer master key (CMK)
// ...
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Key
KMSMasterKeyID *string `json:"kmsMasterKeyId,omitempty"`
KMSMasterKeyIDRef *xpv1.Reference `json:"kmsMasterKeyIdRef,omitempty"`
KMSMasterKeyIDSelector *xpv1.Selector `json:"kmsMasterKeyIdSelector,omitempty"`

It would be absolutely fantastic if crossplane-tools would support listing multiple suitable types here, similar to:

// KMSMasterKeyID - The ID of an AWS-managed customer master key (CMK)
// ...
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Key
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Alias
KMSMasterKeyID *string `json:"kmsMasterKeyId,omitempty"`
KMSMasterKeyIDRef *xpv1.Reference `json:"kmsMasterKeyIdRef,omitempty"`
KMSMasterKeyIDSelector *xpv1.Selector `json:"kmsMasterKeyIdSelector,omitempty"`

If there are multiple suitable candidates users would use matchLabels and suitable matches to differentiate between these resources.

Thank you!

@wwentland wwentland added the enhancement New feature or request label Feb 23, 2022
@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Aug 13, 2022
@wwentland
Copy link
Author

This would still be great to have.

@mbbush
Copy link

mbbush commented Oct 14, 2023

I would love to have this too

@selfuryon
Copy link

Really needed functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants