Crates.io | k8s-pb |
lib.rs | k8s-pb |
version | 0.6.1 |
source | src |
created_at | 2023-12-18 12:55:27.579129 |
updated_at | 2024-10-14 22:09:41.841597 |
description | Bindings for the Kubernetes Client API |
homepage | |
repository | https://github.com/kube-rs/k8s-pb |
max_upload_size | |
id | 1073339 |
size | 1,762,796 |
Kubernetes protobuf bindings for kube-rs. WIP. Not yet useable as is.
This library is not currently usable from kube
.
For now consider these structs a reference location for Kubernetes structs that are not found in k8s-openapi
.
See docs.rs/k8s-pb.
The code generation process consists of 4 steps;
just protos
- download and patch protobufsjust swagger
- download and transform openapi schemajust codegen
- combine info and build with prostjust names
- case alignment and cargo fmt
This can be run in one step with just generate
.
The k8s-pb crate is generated as a result of this process and then published periodically.
Obtains the version pinned protobufs from upstream:
then does minor transforms to prepare them for building.
Obtains the version pinned swagger openapi schema from upstream:
then applies any needed patches before transforming the schema into a shorter json file containing desired generic information.
This json file complements the protos with type type properties needed for trait implementations.
Runs main.rs, using the outputs from the swagger
and protobuf
recipes above. In particular;
protoc
and provides a FileDescriptorSet
via Config::file_descriptor_set_path
.HashMap<String, Resource>
where the string is a GVK string.append_trait_impl