crossplane-runtime
crossplane-runtime copied to clipboard
Relax the requirements of `reference.ExtractValueFn`
What problem are you facing?
Because reference.ExtractValueFn requires resource.Managed interface, until the functions of the CRD types that implement that interface are generated we get compile errors, hence we can't generate those functions because angryjet requires no compile errors before starting to do any code generation.
The workaround I used in provider-jet-aws was to wrap it: https://github.com/crossplane-contrib/provider-jet-aws/blob/ee98973/apis/kms/v1alpha1/extractor.go#L11
How could Crossplane help solve your problem?
If we accept metav1.Object instead of resource.Managed, then we wouldn't have this problem since the code generator of functions that satisfy metav1.Object do not require the code to be able to compile. Another fix could be to make angryjet work with packages that have compile errors though I'm not sure if that's possible.
cc @negz @hasheddan
This could also have the nice side effect of allowing referencer to work with non-Crossplane cluster-scoped resources as well, like ClusterRole or ClusterIssuer of cert-manager.
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.
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.