[go: nahoru, domu]

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

ProviderRef should not be of type ObjectReference #95

Open
muvaf opened this issue Dec 19, 2019 · 2 comments
Open

ProviderRef should not be of type ObjectReference #95

muvaf opened this issue Dec 19, 2019 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@muvaf
Copy link
Member
muvaf commented Dec 19, 2019

What happened?

ProviderReference field that exists in ResourceSpec is of type ObjectReference which has a lot of identifier such as name, namespace, uid, fieldpath etc. In some controllers, we call NamespacedNameOf function which returns an ObjectKey that includes the namespace. This is error-prone since users might add namespace and controller wouldn't be able to locate the object.

Provider objects are cluster-scoped and the type casting happens in managed resource reconciler, meaning its type is hard-coded in the codebase. So, we only need the name of the Provider object. We can have a type in crossplane-runtime like:

type ClusterScopedReference struct {
  APIVersion string `json:"apiVersion,omitempty"
  Kind            string `json:"kind,omitempty"
  Name         string `json:"name"

How can we reproduce it?

Create a managed resource with providerRef that has namespace field populated.

What environment did it happen in?

Crossplane version: 0.5.1

@muvaf muvaf added the bug Something isn't working label Dec 19, 2019
@negz
Copy link
Member
negz commented Sep 7, 2020

Related to #49.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants