- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 365
 
Description
Currently people can instantiate any type of k8s_openapi::Resource and use it with Api::namespaced or Api::all, however, each resource only really works in one Scope.
So it's not a good pattern to have people figure out what is the correct scope, then only later getting an obscure 405 when picking it wrong like in #191 .
It would be useful if k8s_openapi::Resource also told us if the scope was cluster or namespaced, as it would avoid us having to either hardcode objects that are allowed to be used in this scope (we already do a bit of that in https://github.com/clux/kube-rs/blob/06f7b5cc7004ff3c6e23000747140171f03014c8/kube/src/api/resource.rs#L45-L50 )
It would also probably be better to rename Api::all to Api::cluster to signify that this is a scope selector not a --all-namespaces equivalent.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status