-
-
Notifications
You must be signed in to change notification settings - Fork 353
Open
Labels
apiApi abstraction relatedApi abstraction relatedcoregeneric apimachinery style workgeneric apimachinery style workruntimecontroller runtime relatedcontroller runtime related
Description
Would you like to work on this feature?
None
What problem are you trying to solve?
Currently we have two APIs for querying metadata:
Api<K>::get_metadata
(and co)Api<PartialObjectMeta<K>>::get
(and co)
Currently, 1 requests that the K8s API only sends the metadata, while 2 requests the whole object and then discards everything else during deserialization. This requires every API to have separate variants to handle metadata-only requests efficiently (and not all of them have that path, like https://docs.rs/kube/latest/kube/runtime/struct.Controller.html#method.watches).
Describe the solution you'd like
Api::get
(and co) should recognize metadata-only types, and automatically switch to the fast path.
Describe alternatives you've considered
We could continue threading both variants through all APIs that take an Api
.
Documentation, Adoption, Migration Strategy
This should be transparent for end users: if you use the existing API then things just get more efficient.
Target crate for feature
kube-client
Metadata
Metadata
Assignees
Labels
apiApi abstraction relatedApi abstraction relatedcoregeneric apimachinery style workgeneric apimachinery style workruntimecontroller runtime relatedcontroller runtime related