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

resource scope potential 1 - for #194 #199

Closed
wants to merge 5 commits into from
Closed

Conversation

clux
Copy link
Member

@clux clux commented Mar 28, 2020

Tries the first of Arnavion's potentials via Arnavion/k8s-openapi#65 (comment)

It's assumed that k8s-openapi actually fills in these traits rather than me inlining them, but this is for our tests/experimentation atm.

I don't see a good way to get compile time prevention of using Api::create if you're inside a Resource::all view, but we can at least assert here. Not bad at all.

@clux clux mentioned this pull request Mar 28, 2020
it currently just makes things worse because the traits doesn't provide
any information, so leaving it in here.

i like the api though.
clux referenced this pull request in nightkr/kube-rs Jul 25, 2020
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.
@kazk
Copy link
Member

kazk commented Jul 20, 2022

Superseded by #956

@kazk kazk closed this Jul 20, 2022
@clux clux deleted the resource-scope-arnav1 branch July 21, 2022 09:54
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.

None yet

2 participants