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

Store: Allow namespaced ObjectRefs to cluster-scoped objects #294

Merged

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Jul 25, 2020

Fixes #293.

This is a bit magical, but it's fairly common in K8s to allow reference
fields (such as OwnerReferences) to refer to either cluster-scoped objects
or namespaced resources in the same namespace.

Code that converts those events into ObjectRefs generally won't know which of
these cases is applicable, so this is the best we can do.

Fixes kube-rs#293.

This is a bit magical, but it's fairly common in K8s to allow reference
fields (such as `OwnerReferences`) to refer to either cluster-scoped objects
or namespaced resources in the same namespace.

Code that converts those events into `ObjectRef`s generally won't know which of
these cases is applicable, so this is the best we can do.
@nightkr nightkr requested a review from clux July 25, 2020 14:52
@clux
Copy link
Member

clux commented Jul 25, 2020

Ah, crap left comments on your commit rather than the pr.

EDIT: anyway tests are good, just had a question about the last test.

Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question left on the last test, but merge away

@clux clux merged commit 21c783b into kube-rs:master Jul 26, 2020
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.

Reconcile not called if the CR is Cluster scoped and the owns children are namespaced
2 participants