k8s-openapi
k8s-openapi copied to clipboard
Add docs for naming conventions
These are common to spec-generated clients of all languages, but it helps Rust devs who haven't used the other languages' clients before.
-
Resource types are under
api, etc, then under modules corresponding to the API group and version, likecore/v1/Pod->core::v1::Pod -
Functions are associated with the relevant resource type. Eg functions dealing with pods are found in
api::core::v1::Pod's docs.Exceptions: Subresources like
Statusor pod logs are returned by functions of the base resource, eqFoo::read_*_statusorPod::read_namespaced_pod_log.Exceptions to the exceptions: Some subresources like
api::authentication::v1::TokenRequestandapi::core::v1::Bindingare created from functions associated with their own type (TokenRequest::create_namespaced_service_account_tokenandBinding::create_namespaced_pod_bindingrespectively) instead of the parent resource's type. -
Create a resource with
create_*. Get an existing resource withread_*. Update withpatch_*. Delete withdelete_*. Delete a collection withdelete_collection_*. Get a list of resources withlist_*. Watch withwatch_*. -
_namespaced_in the function name is just a convention for resources that are namespaced. (Are there resources that have both_namespaced_and non-_namespaced_functions to compare with?)