-
Notifications
You must be signed in to change notification settings - Fork 97
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
Avoid corev1.ObjectReference and LocalObjectReference #49
Comments
A related issue: kubernetes-retired/service-catalog#1411. I strongly recommend clicking through for context - @deads2k (SIG API Machinery chair) explains in more detail how and why ObjectReference is inappropriate. |
I agree. A PR that implements all meta methods we have that are built on this object for other reference types we have could be helpful for adoption. |
The refactor should include the interfaces where |
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. |
What problem are you facing?
Most inter-resource references in Crossplane are either an
ObjectReference
or aLocalObjectReference
.ObjectReference
contains many optional fields (e.g.UID
,FieldPath
, etc) that Crossplane never uses. This could be misleading to users, since some fields (i.e.Name
) are always optional, and it's not obvious that the other fields are frequently not required when reading the API documentation or CRD specs. The same is true forLocalObjectReference
, which exposes only one field -name
- that is (for some reason that is not obvious to me) marked optional.How could Crossplane help solve your problem?
Crossplane could use purpose-specific references that represent a subset of
ObjectReference
. This is compliant with the API conventions, which state:The text was updated successfully, but these errors were encountered: