diff --git a/.gitignore b/.gitignore index 96ef6c0..09b2d47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target Cargo.lock +protos.fds diff --git a/Cargo.toml b/Cargo.toml index b914b87..34c5504 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,6 @@ -[package] -name = "k8s-pb" -version = "0.1.0" -license = "Apache-2.0" -edition = "2018" - -[dependencies] -bytes = "1.0.1" -prost = "0.8.0" -prost-types = "0.8" - -[build-dependencies] -prost-build = "0.8.0" +[workspace] +default-members = ["k8s-pb"] +members = [ + "k8s-pb-codegen", + "k8s-pb" +] diff --git a/README.md b/README.md index dd39bc8..7911567 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ Experimenting with Kubernetes protobufs. -## Protobufs +## Build Dependencies -### Download +- [fd](https://github.com/sharkdp/fd) +- [jq](https://stedolan.github.io/jq/) +- [just](https://github.com/casey/just) +- [sd](https://github.com/chmln/sd) -Get protos by extracting them from Kubernetes releases: +## Protobufs +We get protos by extracting them from pinned Kubernetes releases: - https://github.com/kubernetes/api/releases - https://github.com/kubernetes/apimachinery/releases @@ -12,69 +16,26 @@ Get protos by extracting them from Kubernetes releases: - https://github.com/kubernetes/kube-aggregator/releases - https://github.com/kubernetes/metrics/releases -```bash -# In `protos/` -VERSION=1.22.0 -for x in api apimachinery apiextensions-apiserver kube-aggregator metrics; do - mkdir ./$x; - curl -sSL https://github.com/kubernetes/$x/archive/refs/tags/kubernetes-$VERSION.tar.gz | tar xzf - -C ./$x/ --strip-components=1; - fd -e proto -x sh -c "mkdir -p k8s.io/'{//}'; mv '{}' k8s.io/'{}'" ';' . ./$x; - rm -rf ./$x; -done -``` +We then do minor transforms on top of that to prepare for building. +Results of this step is committed already. But to run, invoke `just protos` -### Patch +## Openapi +To complement the protos with generic information, we also download the swagger schema, patch it, and transform it as described below. -Removing `k8s.io.`: +Results of this step is committed already. But to run, invoke `just swagger`. -```bash -fd -e proto -x sd 'k8s\.io\.(.+);' '$1;' {} -fd -e proto -x sd 'import "k8s\.io/(.+)";' 'import "$1";' {} -mv protos/k8s.io/* protos/ -rmdir protos/k8s.io/ -``` -### Generate +## Building +To build the [out](./out) directory from [build.rs](./build.rs) we will use the outputs from the `swagger`, `protobuf`, and `protobuf-fds` targets. -Collect all paths to generate: - -```bash -# In project root. -fd -e proto -x echo '"{}",' | sort -``` -Copy the output to `build.rs`, then: - -```bash -cargo build -``` +Results of this step is committed already. But to run, invoke `just codegen` ### Hack -Generate a [`FileDescriptorSet`] containing all of the input files: +Generate a [`FileDescriptorSet`] containing all of the input files wih `just codegen-fds` -```bash -protoc \ - --include_imports \ - --include_source_info \ - --descriptor_set_out=k8s.pb \ - --proto_path=./protos \ - ./protos/**/*.proto -``` -Working with `FileDescriptorSet`: -```rust -use prost_types::{FileDescriptorProto, FileDescriptorSet}; -let buf = fs::read(fds_path).unwrap(); -let fds = FileDescriptorSet::decode(&*buf).unwrap(); -let files = fds.files; -``` - -See [`prost_build`](https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a338e9afd7717d0f42ca9/prost-build/src/lib.rs#L765-L825). - -[`FileDescriptorSet`]: https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a338e9afd7717d0f42ca9/prost-types/src/protobuf.rs#L1-L7 - - -## OpenAPI +## OpenAPI Strategy We need to use `swagger.json` to fill in some information. @@ -97,28 +58,6 @@ We should be able to find the following: - May also have paths for all namespaces for some verbs (e.g., `list` all pods) - Subresource if path contains `/{name}/` (`/` after `{name}`) -### Download - -In `openapi/` - -```bash -VERSION=1.22.0 -curl -sSL -o swagger.json \ - https://raw.githubusercontent.com/kubernetes/kubernetes/v$VERSION/api/openapi-spec/swagger.json -``` - -### Bug Fix - -Fix path operation annotated with a `x-kubernetes-group-version-kind` that references a type that doesn't exist in the schema. (See [`k8s-openapi`](https://github.com/Arnavion/k8s-openapi/blob/445e89ec444ebb1c68e61361e64eec4c4a3f4785/k8s-openapi-codegen/src/fixups/upstream_bugs.rs#L9)). - -```bash -gron swagger.json \ -| perl -pe 's/(?<=kind = ")(Pod|Node|Service)(?:Attach|Exec|PortForward|Proxy)Options(?=")/$1/' \ -| gron -u \ -> swagger-patched.json -mv swagger-patched.json swagger.json -``` - ### Transforming Transform `swagger.json` to something easier to explore. diff --git a/build.rs b/build.rs deleted file mode 100644 index 641ea31..0000000 --- a/build.rs +++ /dev/null @@ -1,74 +0,0 @@ -use std::io::Result; - -fn main() -> Result<()> { - prost_build::Config::new().compile_protos( - &[ - "protos/api/admissionregistration/v1beta1/generated.proto", - "protos/api/admissionregistration/v1/generated.proto", - "protos/api/admission/v1beta1/generated.proto", - "protos/api/admission/v1/generated.proto", - "protos/api/apiserverinternal/v1alpha1/generated.proto", - "protos/api/apps/v1beta1/generated.proto", - "protos/api/apps/v1beta2/generated.proto", - "protos/api/apps/v1/generated.proto", - "protos/api/authentication/v1beta1/generated.proto", - "protos/api/authentication/v1/generated.proto", - "protos/api/authorization/v1beta1/generated.proto", - "protos/api/authorization/v1/generated.proto", - "protos/api/autoscaling/v1/generated.proto", - "protos/api/autoscaling/v2beta1/generated.proto", - "protos/api/autoscaling/v2beta2/generated.proto", - "protos/api/batch/v1beta1/generated.proto", - "protos/api/batch/v1/generated.proto", - "protos/api/certificates/v1beta1/generated.proto", - "protos/api/certificates/v1/generated.proto", - "protos/api/coordination/v1beta1/generated.proto", - "protos/api/coordination/v1/generated.proto", - "protos/api/core/v1/generated.proto", - "protos/api/discovery/v1beta1/generated.proto", - "protos/api/discovery/v1/generated.proto", - "protos/api/events/v1beta1/generated.proto", - "protos/api/events/v1/generated.proto", - "protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", - "protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", - "protos/api/extensions/v1beta1/generated.proto", - "protos/api/flowcontrol/v1alpha1/generated.proto", - "protos/api/flowcontrol/v1beta1/generated.proto", - "protos/api/imagepolicy/v1alpha1/generated.proto", - "protos/apimachinery/pkg/api/resource/generated.proto", - "protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto", - "protos/apimachinery/pkg/apis/meta/v1/generated.proto", - "protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto", - "protos/apimachinery/pkg/runtime/generated.proto", - "protos/apimachinery/pkg/runtime/schema/generated.proto", - "protos/apimachinery/pkg/util/intstr/generated.proto", - "protos/api/networking/v1beta1/generated.proto", - "protos/api/networking/v1/generated.proto", - "protos/api/node/v1alpha1/generated.proto", - "protos/api/node/v1beta1/generated.proto", - "protos/api/node/v1/generated.proto", - "protos/api/policy/v1beta1/generated.proto", - "protos/api/policy/v1/generated.proto", - "protos/api/rbac/v1alpha1/generated.proto", - "protos/api/rbac/v1beta1/generated.proto", - "protos/api/rbac/v1/generated.proto", - "protos/api/scheduling/v1alpha1/generated.proto", - "protos/api/scheduling/v1beta1/generated.proto", - "protos/api/scheduling/v1/generated.proto", - "protos/api/storage/v1alpha1/generated.proto", - "protos/api/storage/v1beta1/generated.proto", - "protos/api/storage/v1/generated.proto", - "protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto", - "protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto", - "protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto", - "protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto", - "protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto", - "protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto", - "protos/metrics/pkg/apis/metrics/v1beta1/generated.proto", - ], - &["protos/"], - )?; - // Generate code in `src/` by reading files in `OUT_DIR`? - // Need to create `mod.rs` file for each level based on the filename, and write generated code in correct file. - Ok(()) -} diff --git a/justfile b/justfile new file mode 100644 index 0000000..bb457b9 --- /dev/null +++ b/justfile @@ -0,0 +1,77 @@ +VERSION := "1.22.0" + +default: + @just --list + +# Download protos schemas from upstream +protos-dl: + #!/usr/bin/env bash + set -exuo pipefail + rm -rf protos && mkdir protos && cd protos + for x in api apimachinery apiextensions-apiserver kube-aggregator metrics; do + mkdir ./$x -p + curl -sSL https://github.com/kubernetes/$x/archive/refs/tags/kubernetes-{{VERSION}}.tar.gz | tar xzf - -C ./$x/ --strip-components=1 + fd -e proto -x sh -c "mkdir -p k8s.io/'{//}'; mv '{}' k8s.io/'{}'" ';' . ./$x + rm -rf ./$x + done + +# Patch protos schemas to fix import paths +protos-patch: + #!/usr/bin/env bash + set -exuo pipefail + fd -e proto -x sd 'k8s\.io\.(.+);' '$1;' {} + fd -e proto -x sd 'import "k8s\.io/(.+)";' 'import "$1";' {} + mv protos/k8s.io/* protos/ + rmdir protos/k8s.io/ + +# Generate protos path list for prost +protos-list: + fd -e proto | sort > protos.list + +# Download and generate all protos dependent files +protos: protos-dl protos-patch protos-list + +# Download swagger +swagger-dl: + #!/usr/bin/env bash + set -exuo pipefail + curl -sSL -o k8s-pb-codegen/openapi/swagger.json \ + https://raw.githubusercontent.com/kubernetes/kubernetes/v{{VERSION}}/api/openapi-spec/swagger.json + +# Patch swagger schema for upstream bugs +swagger-patch: + #!/usr/bin/env bash + set -exuo pipefail + cd k8s-pb-codegen/openapi + jq -f patches/patch-nonexistent-gvk.jq < swagger.json > swagger-patched.json + mv swagger-patched.json swagger.json + +# Transform swagger schema into api-resources.json +swagger-transform: + #!/usr/bin/env bash + set -exuo pipefail + cd k8s-pb-codegen/openapi + jq -f list-resources.jq < swagger.json > api-resources.json + +# Download and generate all swagger dependent files +swagger: swagger-dl swagger-patch swagger-transform + +# Build a FileDescriptorSet for custom code generation +codegen-fds: + #!/usr/bin/env bash + set -exuo pipefail + shopt -s globstar + cd k8s-pb-codegen + protoc \ + --include_imports \ + --include_source_info \ + --descriptor_set_out=protos.fds \ + --proto_path=./protos \ + ./protos/**/*.proto + +# Generate the library code from completed swagger and protos +codegen: codegen-fds + #!/usr/bin/env bash + set -exuo pipefail + rm -rf out/ && mkdir out + cd k8s-pb-codegen && cargo run diff --git a/k8s-pb-codegen/Cargo.toml b/k8s-pb-codegen/Cargo.toml new file mode 100644 index 0000000..55195e0 --- /dev/null +++ b/k8s-pb-codegen/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "k8s-pb-codegen" +version = "0.1.0" +edition = "2018" +license = "Apache-2.0" + +[[bin]] +name = "pbcodegen" +path = "pbcodegen.rs" + +[lib] +name = "pbcodegen" +path = "src/lib.rs" + +[dependencies] +bytes = "1.0.1" +prost = "0.8.0" +prost-build = "0.8.0" +prost-types = "0.8.0" +serde_json = "1.0.67" +serde = { version = "1.0.130", features = ["derive"] } +log = "0.4.14" +anyhow = "1.0.44" +env_logger = "0.9.0" diff --git a/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json similarity index 65% rename from openapi/api-resources.json rename to k8s-pb-codegen/openapi/api-resources.json index 2459a3c..81ec0dd 100644 --- a/openapi/api-resources.json +++ b/k8s-pb-codegen/openapi/api-resources.json @@ -5,12 +5,16 @@ { "name": "mutatingwebhookconfigurations", "namespaced": false, - "subresource": false, "apiGroupVersion": "admissionregistration.k8s.io/v1", "group": "admissionregistration.k8s.io", "version": "v1", "kind": "MutatingWebhookConfiguration", + "proto": "api.admissionregistration.v1.MutatingWebhookConfiguration", "rust": "api::admissionregistration::v1::MutatingWebhookConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -34,17 +38,22 @@ "paths": [ "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations", "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" - ] + ], + "subresources": [] }, { "name": "validatingwebhookconfigurations", "namespaced": false, - "subresource": false, "apiGroupVersion": "admissionregistration.k8s.io/v1", "group": "admissionregistration.k8s.io", "version": "v1", "kind": "ValidatingWebhookConfiguration", + "proto": "api.admissionregistration.v1.ValidatingWebhookConfiguration", "rust": "api::admissionregistration::v1::ValidatingWebhookConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -68,7 +77,8 @@ "paths": [ "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations", "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" - ] + ], + "subresources": [] } ] }, @@ -78,12 +88,16 @@ { "name": "customresourcedefinitions", "namespaced": false, - "subresource": false, "apiGroupVersion": "apiextensions.k8s.io/v1", "group": "apiextensions.k8s.io", "version": "v1", "kind": "CustomResourceDefinition", + "proto": "apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition", "rust": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinitionSpec", + "status": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinitionStatus", + "condition": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinitionCondition", "verbs": [ "create", "delete", @@ -107,31 +121,21 @@ "paths": [ "/apis/apiextensions.k8s.io/v1/customresourcedefinitions", "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}" - ] - }, - { - "name": "customresourcedefinitions/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "apiextensions.k8s.io/v1", - "group": "apiextensions.k8s.io", - "version": "v1", - "kind": "CustomResourceDefinition", - "rust": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status" + ] + } ] } ] @@ -142,12 +146,16 @@ { "name": "apiservices", "namespaced": false, - "subresource": false, "apiGroupVersion": "apiregistration.k8s.io/v1", "group": "apiregistration.k8s.io", "version": "v1", "kind": "APIService", + "proto": "kube_aggregator.pkg.apis.apiregistration.v1.APIService", "rust": "kube_aggregator::pkg::apis::apiregistration::v1::APIService", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceSpec", + "status": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceStatus", + "condition": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceCondition", "verbs": [ "create", "delete", @@ -171,31 +179,21 @@ "paths": [ "/apis/apiregistration.k8s.io/v1/apiservices", "/apis/apiregistration.k8s.io/v1/apiservices/{name}" - ] - }, - { - "name": "apiservices/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "apiregistration.k8s.io/v1", - "group": "apiregistration.k8s.io", - "version": "v1", - "kind": "APIService", - "rust": "kube_aggregator::pkg::apis::apiregistration::v1::APIService", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status" + ] + } ] } ] @@ -206,12 +204,16 @@ { "name": "controllerrevisions", "namespaced": true, - "subresource": false, "apiGroupVersion": "apps/v1", "group": "apps", "version": "v1", "kind": "ControllerRevision", + "proto": "api.apps.v1.ControllerRevision", "rust": "api::apps::v1::ControllerRevision", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -239,17 +241,22 @@ "/apis/apps/v1/controllerrevisions", "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" - ] + ], + "subresources": [] }, { "name": "daemonsets", "namespaced": true, - "subresource": false, "apiGroupVersion": "apps/v1", "group": "apps", "version": "v1", "kind": "DaemonSet", + "proto": "api.apps.v1.DaemonSet", "rust": "api::apps::v1::DaemonSet", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::DaemonSetSpec", + "status": "api::apps::v1::DaemonSetStatus", + "condition": "api::apps::v1::DaemonSetCondition", "verbs": [ "create", "delete", @@ -277,42 +284,36 @@ "/apis/apps/v1/daemonsets", "/apis/apps/v1/namespaces/{namespace}/daemonsets", "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}" - ] - }, - { - "name": "daemonsets/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "apps", - "version": "v1", - "kind": "DaemonSet", - "rust": "api::apps::v1::DaemonSet", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status" + ] + } ] }, { "name": "deployments", "namespaced": true, - "subresource": false, "apiGroupVersion": "apps/v1", "group": "apps", "version": "v1", "kind": "Deployment", + "proto": "api.apps.v1.Deployment", "rust": "api::apps::v1::Deployment", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::DeploymentSpec", + "status": "api::apps::v1::DeploymentStatus", + "condition": "api::apps::v1::DeploymentCondition", "verbs": [ "create", "delete", @@ -340,67 +341,49 @@ "/apis/apps/v1/deployments", "/apis/apps/v1/namespaces/{namespace}/deployments", "/apis/apps/v1/namespaces/{namespace}/deployments/{name}" - ] - }, - { - "name": "deployments/scale", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "autoscaling", - "version": "v1", - "kind": "Scale", - "rust": "api::autoscaling::v1::Scale", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale" - ] - }, - { - "name": "deployments/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "apps", - "version": "v1", - "kind": "Deployment", - "rust": "api::apps::v1::Deployment", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status" + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status" + ] + } ] }, { "name": "replicasets", "namespaced": true, - "subresource": false, "apiGroupVersion": "apps/v1", "group": "apps", "version": "v1", "kind": "ReplicaSet", + "proto": "api.apps.v1.ReplicaSet", "rust": "api::apps::v1::ReplicaSet", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::ReplicaSetSpec", + "status": "api::apps::v1::ReplicaSetStatus", + "condition": "api::apps::v1::ReplicaSetCondition", "verbs": [ "create", "delete", @@ -428,67 +411,49 @@ "/apis/apps/v1/replicasets", "/apis/apps/v1/namespaces/{namespace}/replicasets", "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}" - ] - }, - { - "name": "replicasets/scale", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "autoscaling", - "version": "v1", - "kind": "Scale", - "rust": "api::autoscaling::v1::Scale", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale" - ] - }, - { - "name": "replicasets/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "apps", - "version": "v1", - "kind": "ReplicaSet", - "rust": "api::apps::v1::ReplicaSet", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status" + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status" + ] + } ] }, { "name": "statefulsets", "namespaced": true, - "subresource": false, "apiGroupVersion": "apps/v1", "group": "apps", "version": "v1", "kind": "StatefulSet", + "proto": "api.apps.v1.StatefulSet", "rust": "api::apps::v1::StatefulSet", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::StatefulSetSpec", + "status": "api::apps::v1::StatefulSetStatus", + "condition": "api::apps::v1::StatefulSetCondition", "verbs": [ "create", "delete", @@ -516,56 +481,34 @@ "/apis/apps/v1/statefulsets", "/apis/apps/v1/namespaces/{namespace}/statefulsets", "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}" - ] - }, - { - "name": "statefulsets/scale", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "autoscaling", - "version": "v1", - "kind": "Scale", - "rust": "api::autoscaling::v1::Scale", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale" - ] - }, - { - "name": "statefulsets/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "apps/v1", - "group": "apps", - "version": "v1", - "kind": "StatefulSet", - "rust": "api::apps::v1::StatefulSet", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status" + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status" + ] + } ] } ] @@ -576,12 +519,16 @@ { "name": "tokenreviews", "namespaced": false, - "subresource": false, "apiGroupVersion": "authentication.k8s.io/v1", "group": "authentication.k8s.io", "version": "v1", "kind": "TokenReview", + "proto": "api.authentication.v1.TokenReview", "rust": "api::authentication::v1::TokenReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authentication::v1::TokenReviewSpec", + "status": "api::authentication::v1::TokenReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -592,7 +539,8 @@ }, "paths": [ "/apis/authentication.k8s.io/v1/tokenreviews" - ] + ], + "subresources": [] } ] }, @@ -602,12 +550,16 @@ { "name": "localsubjectaccessreviews", "namespaced": true, - "subresource": false, "apiGroupVersion": "authorization.k8s.io/v1", "group": "authorization.k8s.io", "version": "v1", "kind": "LocalSubjectAccessReview", + "proto": "api.authorization.v1.LocalSubjectAccessReview", "rust": "api::authorization::v1::LocalSubjectAccessReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -618,17 +570,22 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews" - ] + ], + "subresources": [] }, { "name": "selfsubjectaccessreviews", "namespaced": false, - "subresource": false, "apiGroupVersion": "authorization.k8s.io/v1", "group": "authorization.k8s.io", "version": "v1", "kind": "SelfSubjectAccessReview", + "proto": "api.authorization.v1.SelfSubjectAccessReview", "rust": "api::authorization::v1::SelfSubjectAccessReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SelfSubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -639,17 +596,22 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews" - ] + ], + "subresources": [] }, { "name": "selfsubjectrulesreviews", "namespaced": false, - "subresource": false, "apiGroupVersion": "authorization.k8s.io/v1", "group": "authorization.k8s.io", "version": "v1", "kind": "SelfSubjectRulesReview", + "proto": "api.authorization.v1.SelfSubjectRulesReview", "rust": "api::authorization::v1::SelfSubjectRulesReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SelfSubjectRulesReviewSpec", + "status": "api::authorization::v1::SubjectRulesReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -660,17 +622,22 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews" - ] + ], + "subresources": [] }, { "name": "subjectaccessreviews", "namespaced": false, - "subresource": false, "apiGroupVersion": "authorization.k8s.io/v1", "group": "authorization.k8s.io", "version": "v1", "kind": "SubjectAccessReview", + "proto": "api.authorization.v1.SubjectAccessReview", "rust": "api::authorization::v1::SubjectAccessReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -681,7 +648,8 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/subjectaccessreviews" - ] + ], + "subresources": [] } ] }, @@ -691,12 +659,16 @@ { "name": "horizontalpodautoscalers", "namespaced": true, - "subresource": false, "apiGroupVersion": "autoscaling/v1", "group": "autoscaling", "version": "v1", "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v1.HorizontalPodAutoscaler", "rust": "api::autoscaling::v1::HorizontalPodAutoscaler", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::autoscaling::v1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v1::HorizontalPodAutoscalerStatus", + "condition": null, "verbs": [ "create", "delete", @@ -724,31 +696,21 @@ "/apis/autoscaling/v1/horizontalpodautoscalers", "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}" - ] - }, - { - "name": "horizontalpodautoscalers/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "autoscaling/v1", - "group": "autoscaling", - "version": "v1", - "kind": "HorizontalPodAutoscaler", - "rust": "api::autoscaling::v1::HorizontalPodAutoscaler", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] } ] @@ -759,12 +721,16 @@ { "name": "horizontalpodautoscalers", "namespaced": true, - "subresource": false, "apiGroupVersion": "autoscaling/v2beta1", "group": "autoscaling", "version": "v2beta1", "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v2beta1.HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta1::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta1::HorizontalPodAutoscalerCondition", "verbs": [ "create", "delete", @@ -792,31 +758,21 @@ "/apis/autoscaling/v2beta1/horizontalpodautoscalers", "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}" - ] - }, - { - "name": "horizontalpodautoscalers/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "autoscaling/v2beta1", - "group": "autoscaling", - "version": "v2beta1", - "kind": "HorizontalPodAutoscaler", - "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] } ] @@ -827,12 +783,16 @@ { "name": "horizontalpodautoscalers", "namespaced": true, - "subresource": false, "apiGroupVersion": "autoscaling/v2beta2", "group": "autoscaling", "version": "v2beta2", "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v2beta2.HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta2::HorizontalPodAutoscaler", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::autoscaling::v2beta2::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta2::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta2::HorizontalPodAutoscalerCondition", "verbs": [ "create", "delete", @@ -860,47 +820,41 @@ "/apis/autoscaling/v2beta2/horizontalpodautoscalers", "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] - }, + } + ] + }, + { + "apiGroupVersion": "batch/v1", + "resources": [ { - "name": "horizontalpodautoscalers/status", + "name": "cronjobs", "namespaced": true, - "subresource": true, - "apiGroupVersion": "autoscaling/v2beta2", - "group": "autoscaling", - "version": "v2beta2", - "kind": "HorizontalPodAutoscaler", - "rust": "api::autoscaling::v2beta2::HorizontalPodAutoscaler", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" - ] - } - ] - }, - { - "apiGroupVersion": "batch/v1", - "resources": [ - { - "name": "cronjobs", - "namespaced": true, - "subresource": false, "apiGroupVersion": "batch/v1", "group": "batch", "version": "v1", "kind": "CronJob", + "proto": "api.batch.v1.CronJob", "rust": "api::batch::v1::CronJob", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::batch::v1::CronJobSpec", + "status": "api::batch::v1::CronJobStatus", + "condition": null, "verbs": [ "create", "delete", @@ -928,42 +882,36 @@ "/apis/batch/v1/cronjobs", "/apis/batch/v1/namespaces/{namespace}/cronjobs", "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}" - ] - }, - { - "name": "cronjobs/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "batch/v1", - "group": "batch", - "version": "v1", - "kind": "CronJob", - "rust": "api::batch::v1::CronJob", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status" + ] + } ] }, { "name": "jobs", "namespaced": true, - "subresource": false, "apiGroupVersion": "batch/v1", "group": "batch", "version": "v1", "kind": "Job", + "proto": "api.batch.v1.Job", "rust": "api::batch::v1::Job", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::batch::v1::JobSpec", + "status": "api::batch::v1::JobStatus", + "condition": "api::batch::v1::JobCondition", "verbs": [ "create", "delete", @@ -991,31 +939,21 @@ "/apis/batch/v1/jobs", "/apis/batch/v1/namespaces/{namespace}/jobs", "/apis/batch/v1/namespaces/{namespace}/jobs/{name}" - ] - }, - { - "name": "jobs/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "batch/v1", - "group": "batch", - "version": "v1", - "kind": "Job", - "rust": "api::batch::v1::Job", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status" + ] + } ] } ] @@ -1026,12 +964,16 @@ { "name": "cronjobs", "namespaced": true, - "subresource": false, "apiGroupVersion": "batch/v1beta1", "group": "batch", "version": "v1beta1", "kind": "CronJob", + "proto": "api.batch.v1beta1.CronJob", "rust": "api::batch::v1beta1::CronJob", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::batch::v1beta1::CronJobSpec", + "status": "api::batch::v1beta1::CronJobStatus", + "condition": null, "verbs": [ "create", "delete", @@ -1059,31 +1001,21 @@ "/apis/batch/v1beta1/cronjobs", "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs", "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}" - ] - }, - { - "name": "cronjobs/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "batch/v1beta1", - "group": "batch", - "version": "v1beta1", - "kind": "CronJob", - "rust": "api::batch::v1beta1::CronJob", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status" + ] + } ] } ] @@ -1094,12 +1026,16 @@ { "name": "certificatesigningrequests", "namespaced": false, - "subresource": false, "apiGroupVersion": "certificates.k8s.io/v1", "group": "certificates.k8s.io", "version": "v1", "kind": "CertificateSigningRequest", + "proto": "api.certificates.v1.CertificateSigningRequest", "rust": "api::certificates::v1::CertificateSigningRequest", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::certificates::v1::CertificateSigningRequestSpec", + "status": "api::certificates::v1::CertificateSigningRequestStatus", + "condition": "api::certificates::v1::CertificateSigningRequestCondition", "verbs": [ "create", "delete", @@ -1123,56 +1059,34 @@ "paths": [ "/apis/certificates.k8s.io/v1/certificatesigningrequests", "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}" - ] - }, - { - "name": "certificatesigningrequests/approval", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "certificates.k8s.io/v1", - "group": "certificates.k8s.io", - "version": "v1", - "kind": "CertificateSigningRequest", - "rust": "api::certificates::v1::CertificateSigningRequest", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval" - ] - }, - { - "name": "certificatesigningrequests/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "certificates.k8s.io/v1", - "group": "certificates.k8s.io", - "version": "v1", - "kind": "CertificateSigningRequest", - "rust": "api::certificates::v1::CertificateSigningRequest", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status" + "subresources": [ + { + "name": "approval", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status" + ] + } ] } ] @@ -1183,12 +1097,16 @@ { "name": "leases", "namespaced": true, - "subresource": false, "apiGroupVersion": "coordination.k8s.io/v1", "group": "coordination.k8s.io", "version": "v1", "kind": "Lease", + "proto": "api.coordination.v1.Lease", "rust": "api::coordination::v1::Lease", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::coordination::v1::LeaseSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1216,7 +1134,8 @@ "/apis/coordination.k8s.io/v1/leases", "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases", "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}" - ] + ], + "subresources": [] } ] }, @@ -1226,12 +1145,16 @@ { "name": "endpointslices", "namespaced": true, - "subresource": false, "apiGroupVersion": "discovery.k8s.io/v1", "group": "discovery.k8s.io", "version": "v1", "kind": "EndpointSlice", + "proto": "api.discovery.v1.EndpointSlice", "rust": "api::discovery::v1::EndpointSlice", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1259,7 +1182,8 @@ "/apis/discovery.k8s.io/v1/endpointslices", "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices", "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}" - ] + ], + "subresources": [] } ] }, @@ -1269,12 +1193,16 @@ { "name": "endpointslices", "namespaced": true, - "subresource": false, "apiGroupVersion": "discovery.k8s.io/v1beta1", "group": "discovery.k8s.io", "version": "v1beta1", "kind": "EndpointSlice", + "proto": "api.discovery.v1beta1.EndpointSlice", "rust": "api::discovery::v1beta1::EndpointSlice", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1302,7 +1230,8 @@ "/apis/discovery.k8s.io/v1beta1/endpointslices", "/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices", "/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}" - ] + ], + "subresources": [] } ] }, @@ -1312,12 +1241,16 @@ { "name": "events", "namespaced": true, - "subresource": false, "apiGroupVersion": "events.k8s.io/v1", "group": "events.k8s.io", "version": "v1", "kind": "Event", + "proto": "api.events.v1.Event", "rust": "api::events::v1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1345,7 +1278,8 @@ "/apis/events.k8s.io/v1/events", "/apis/events.k8s.io/v1/namespaces/{namespace}/events", "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}" - ] + ], + "subresources": [] } ] }, @@ -1355,12 +1289,16 @@ { "name": "events", "namespaced": true, - "subresource": false, "apiGroupVersion": "events.k8s.io/v1beta1", "group": "events.k8s.io", "version": "v1beta1", "kind": "Event", + "proto": "api.events.v1beta1.Event", "rust": "api::events::v1beta1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1388,7 +1326,8 @@ "/apis/events.k8s.io/v1beta1/events", "/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events", "/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}" - ] + ], + "subresources": [] } ] }, @@ -1398,12 +1337,16 @@ { "name": "flowschemas", "namespaced": false, - "subresource": false, "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", "group": "flowcontrol.apiserver.k8s.io", "version": "v1beta1", "kind": "FlowSchema", + "proto": "api.flowcontrol.v1beta1.FlowSchema", "rust": "api::flowcontrol::v1beta1::FlowSchema", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::flowcontrol::v1beta1::FlowSchemaSpec", + "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", + "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", "verbs": [ "create", "delete", @@ -1427,42 +1370,36 @@ "paths": [ "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas", "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}" - ] - }, - { - "name": "flowschemas/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", - "group": "flowcontrol.apiserver.k8s.io", - "version": "v1beta1", - "kind": "FlowSchema", - "rust": "api::flowcontrol::v1beta1::FlowSchema", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status" + ] + } ] }, { "name": "prioritylevelconfigurations", "namespaced": false, - "subresource": false, "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", "group": "flowcontrol.apiserver.k8s.io", "version": "v1beta1", "kind": "PriorityLevelConfiguration", + "proto": "api.flowcontrol.v1beta1.PriorityLevelConfiguration", "rust": "api::flowcontrol::v1beta1::PriorityLevelConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::flowcontrol::v1beta1::PriorityLevelConfigurationSpec", + "status": "api::flowcontrol::v1beta1::PriorityLevelConfigurationStatus", + "condition": "api::flowcontrol::v1beta1::PriorityLevelConfigurationCondition", "verbs": [ "create", "delete", @@ -1486,31 +1423,21 @@ "paths": [ "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations", "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}" - ] - }, - { - "name": "prioritylevelconfigurations/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", - "group": "flowcontrol.apiserver.k8s.io", - "version": "v1beta1", - "kind": "PriorityLevelConfiguration", - "rust": "api::flowcontrol::v1beta1::PriorityLevelConfiguration", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" + ] + } ] } ] @@ -1521,12 +1448,16 @@ { "name": "storageversions", "namespaced": false, - "subresource": false, "apiGroupVersion": "internal.apiserver.k8s.io/v1alpha1", "group": "internal.apiserver.k8s.io", "version": "v1alpha1", "kind": "StorageVersion", + "proto": "api.apiserverinternal.v1alpha1.StorageVersion", "rust": "api::apiserverinternal::v1alpha1::StorageVersion", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apiserverinternal::v1alpha1::StorageVersionSpec", + "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", + "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", "verbs": [ "create", "delete", @@ -1550,31 +1481,21 @@ "paths": [ "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions", "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}" - ] - }, - { - "name": "storageversions/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "internal.apiserver.k8s.io/v1alpha1", - "group": "internal.apiserver.k8s.io", - "version": "v1alpha1", - "kind": "StorageVersion", - "rust": "api::apiserverinternal::v1alpha1::StorageVersion", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status" + ] + } ] } ] @@ -1585,12 +1506,16 @@ { "name": "ingressclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "networking.k8s.io/v1", "group": "networking.k8s.io", "version": "v1", "kind": "IngressClass", + "proto": "api.networking.v1.IngressClass", "rust": "api::networking::v1::IngressClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::networking::v1::IngressClassSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1614,17 +1539,22 @@ "paths": [ "/apis/networking.k8s.io/v1/ingressclasses", "/apis/networking.k8s.io/v1/ingressclasses/{name}" - ] + ], + "subresources": [] }, { "name": "ingresses", "namespaced": true, - "subresource": false, "apiGroupVersion": "networking.k8s.io/v1", "group": "networking.k8s.io", "version": "v1", "kind": "Ingress", + "proto": "api.networking.v1.Ingress", "rust": "api::networking::v1::Ingress", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::networking::v1::IngressSpec", + "status": "api::networking::v1::IngressStatus", + "condition": null, "verbs": [ "create", "delete", @@ -1652,42 +1582,36 @@ "/apis/networking.k8s.io/v1/ingresses", "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses", "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" - ] - }, - { - "name": "ingresses/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "networking.k8s.io/v1", - "group": "networking.k8s.io", - "version": "v1", - "kind": "Ingress", - "rust": "api::networking::v1::Ingress", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" + ] + } ] }, { "name": "networkpolicies", "namespaced": true, - "subresource": false, "apiGroupVersion": "networking.k8s.io/v1", "group": "networking.k8s.io", "version": "v1", "kind": "NetworkPolicy", + "proto": "api.networking.v1.NetworkPolicy", "rust": "api::networking::v1::NetworkPolicy", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::networking::v1::NetworkPolicySpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1715,7 +1639,8 @@ "/apis/networking.k8s.io/v1/networkpolicies", "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies", "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" - ] + ], + "subresources": [] } ] }, @@ -1725,12 +1650,16 @@ { "name": "runtimeclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "node.k8s.io/v1", "group": "node.k8s.io", "version": "v1", "kind": "RuntimeClass", + "proto": "api.node.v1.RuntimeClass", "rust": "api::node::v1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1754,7 +1683,8 @@ "paths": [ "/apis/node.k8s.io/v1/runtimeclasses", "/apis/node.k8s.io/v1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -1764,12 +1694,16 @@ { "name": "runtimeclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "node.k8s.io/v1alpha1", "group": "node.k8s.io", "version": "v1alpha1", "kind": "RuntimeClass", + "proto": "api.node.v1alpha1.RuntimeClass", "rust": "api::node::v1alpha1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::node::v1alpha1::RuntimeClassSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1793,7 +1727,8 @@ "paths": [ "/apis/node.k8s.io/v1alpha1/runtimeclasses", "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -1803,12 +1738,16 @@ { "name": "runtimeclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "node.k8s.io/v1beta1", "group": "node.k8s.io", "version": "v1beta1", "kind": "RuntimeClass", + "proto": "api.node.v1beta1.RuntimeClass", "rust": "api::node::v1beta1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1832,7 +1771,8 @@ "paths": [ "/apis/node.k8s.io/v1beta1/runtimeclasses", "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -1842,12 +1782,16 @@ { "name": "poddisruptionbudgets", "namespaced": true, - "subresource": false, "apiGroupVersion": "policy/v1", "group": "policy", "version": "v1", "kind": "PodDisruptionBudget", + "proto": "api.policy.v1.PodDisruptionBudget", "rust": "api::policy::v1::PodDisruptionBudget", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::policy::v1::PodDisruptionBudgetSpec", + "status": "api::policy::v1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "create", "delete", @@ -1875,31 +1819,21 @@ "/apis/policy/v1/poddisruptionbudgets", "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets", "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}" - ] - }, - { - "name": "poddisruptionbudgets/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "policy/v1", - "group": "policy", - "version": "v1", - "kind": "PodDisruptionBudget", - "rust": "api::policy::v1::PodDisruptionBudget", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } ] } ] @@ -1910,12 +1844,16 @@ { "name": "poddisruptionbudgets", "namespaced": true, - "subresource": false, "apiGroupVersion": "policy/v1beta1", "group": "policy", "version": "v1beta1", "kind": "PodDisruptionBudget", + "proto": "api.policy.v1beta1.PodDisruptionBudget", "rust": "api::policy::v1beta1::PodDisruptionBudget", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::policy::v1beta1::PodDisruptionBudgetSpec", + "status": "api::policy::v1beta1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "create", "delete", @@ -1943,42 +1881,36 @@ "/apis/policy/v1beta1/poddisruptionbudgets", "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets", "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}" - ] - }, - { - "name": "poddisruptionbudgets/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "policy/v1beta1", - "group": "policy", - "version": "v1beta1", - "kind": "PodDisruptionBudget", - "rust": "api::policy::v1beta1::PodDisruptionBudget", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } ] }, { "name": "podsecuritypolicies", "namespaced": false, - "subresource": false, "apiGroupVersion": "policy/v1beta1", "group": "policy", "version": "v1beta1", "kind": "PodSecurityPolicy", + "proto": "api.policy.v1beta1.PodSecurityPolicy", "rust": "api::policy::v1beta1::PodSecurityPolicy", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::policy::v1beta1::PodSecurityPolicySpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2002,7 +1934,8 @@ "paths": [ "/apis/policy/v1beta1/podsecuritypolicies", "/apis/policy/v1beta1/podsecuritypolicies/{name}" - ] + ], + "subresources": [] } ] }, @@ -2012,12 +1945,16 @@ { "name": "clusterrolebindings", "namespaced": false, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1", "group": "rbac.authorization.k8s.io", "version": "v1", "kind": "ClusterRoleBinding", + "proto": "api.rbac.v1.ClusterRoleBinding", "rust": "api::rbac::v1::ClusterRoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2041,17 +1978,22 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings", "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}" - ] + ], + "subresources": [] }, { "name": "clusterroles", "namespaced": false, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1", "group": "rbac.authorization.k8s.io", "version": "v1", "kind": "ClusterRole", + "proto": "api.rbac.v1.ClusterRole", "rust": "api::rbac::v1::ClusterRole", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2075,17 +2017,22 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1/clusterroles", "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}" - ] + ], + "subresources": [] }, { "name": "rolebindings", "namespaced": true, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1", "group": "rbac.authorization.k8s.io", "version": "v1", "kind": "RoleBinding", + "proto": "api.rbac.v1.RoleBinding", "rust": "api::rbac::v1::RoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2113,17 +2060,22 @@ "/apis/rbac.authorization.k8s.io/v1/rolebindings", "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings", "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}" - ] + ], + "subresources": [] }, { "name": "roles", "namespaced": true, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1", "group": "rbac.authorization.k8s.io", "version": "v1", "kind": "Role", + "proto": "api.rbac.v1.Role", "rust": "api::rbac::v1::Role", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2151,7 +2103,8 @@ "/apis/rbac.authorization.k8s.io/v1/roles", "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles", "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}" - ] + ], + "subresources": [] } ] }, @@ -2161,12 +2114,16 @@ { "name": "clusterrolebindings", "namespaced": false, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", "group": "rbac.authorization.k8s.io", "version": "v1alpha1", "kind": "ClusterRoleBinding", + "proto": "api.rbac.v1alpha1.ClusterRoleBinding", "rust": "api::rbac::v1alpha1::ClusterRoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2190,17 +2147,22 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings", "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}" - ] + ], + "subresources": [] }, { "name": "clusterroles", "namespaced": false, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", "group": "rbac.authorization.k8s.io", "version": "v1alpha1", "kind": "ClusterRole", + "proto": "api.rbac.v1alpha1.ClusterRole", "rust": "api::rbac::v1alpha1::ClusterRole", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2224,17 +2186,22 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles", "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}" - ] + ], + "subresources": [] }, { "name": "rolebindings", "namespaced": true, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", "group": "rbac.authorization.k8s.io", "version": "v1alpha1", "kind": "RoleBinding", + "proto": "api.rbac.v1alpha1.RoleBinding", "rust": "api::rbac::v1alpha1::RoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2262,17 +2229,22 @@ "/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings", "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings", "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}" - ] + ], + "subresources": [] }, { "name": "roles", "namespaced": true, - "subresource": false, "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", "group": "rbac.authorization.k8s.io", "version": "v1alpha1", "kind": "Role", + "proto": "api.rbac.v1alpha1.Role", "rust": "api::rbac::v1alpha1::Role", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2300,7 +2272,8 @@ "/apis/rbac.authorization.k8s.io/v1alpha1/roles", "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles", "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}" - ] + ], + "subresources": [] } ] }, @@ -2310,12 +2283,16 @@ { "name": "priorityclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "scheduling.k8s.io/v1", "group": "scheduling.k8s.io", "version": "v1", "kind": "PriorityClass", + "proto": "api.scheduling.v1.PriorityClass", "rust": "api::scheduling::v1::PriorityClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2339,7 +2316,8 @@ "paths": [ "/apis/scheduling.k8s.io/v1/priorityclasses", "/apis/scheduling.k8s.io/v1/priorityclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2349,12 +2327,16 @@ { "name": "priorityclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "scheduling.k8s.io/v1alpha1", "group": "scheduling.k8s.io", "version": "v1alpha1", "kind": "PriorityClass", + "proto": "api.scheduling.v1alpha1.PriorityClass", "rust": "api::scheduling::v1alpha1::PriorityClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2378,7 +2360,8 @@ "paths": [ "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2388,12 +2371,16 @@ { "name": "csidrivers", "namespaced": false, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1", "group": "storage.k8s.io", "version": "v1", "kind": "CSIDriver", + "proto": "api.storage.v1.CSIDriver", "rust": "api::storage::v1::CSIDriver", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1::CSIDriverSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2417,17 +2404,22 @@ "paths": [ "/apis/storage.k8s.io/v1/csidrivers", "/apis/storage.k8s.io/v1/csidrivers/{name}" - ] + ], + "subresources": [] }, { "name": "csinodes", "namespaced": false, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1", "group": "storage.k8s.io", "version": "v1", "kind": "CSINode", + "proto": "api.storage.v1.CSINode", "rust": "api::storage::v1::CSINode", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1::CSINodeSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2451,17 +2443,22 @@ "paths": [ "/apis/storage.k8s.io/v1/csinodes", "/apis/storage.k8s.io/v1/csinodes/{name}" - ] + ], + "subresources": [] }, { "name": "storageclasses", "namespaced": false, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1", "group": "storage.k8s.io", "version": "v1", "kind": "StorageClass", + "proto": "api.storage.v1.StorageClass", "rust": "api::storage::v1::StorageClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2485,17 +2482,22 @@ "paths": [ "/apis/storage.k8s.io/v1/storageclasses", "/apis/storage.k8s.io/v1/storageclasses/{name}" - ] + ], + "subresources": [] }, { "name": "volumeattachments", "namespaced": false, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1", "group": "storage.k8s.io", "version": "v1", "kind": "VolumeAttachment", + "proto": "api.storage.v1.VolumeAttachment", "rust": "api::storage::v1::VolumeAttachment", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1::VolumeAttachmentSpec", + "status": "api::storage::v1::VolumeAttachmentStatus", + "condition": null, "verbs": [ "create", "delete", @@ -2519,31 +2521,21 @@ "paths": [ "/apis/storage.k8s.io/v1/volumeattachments", "/apis/storage.k8s.io/v1/volumeattachments/{name}" - ] - }, - { - "name": "volumeattachments/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "storage.k8s.io/v1", - "group": "storage.k8s.io", - "version": "v1", - "kind": "VolumeAttachment", - "rust": "api::storage::v1::VolumeAttachment", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/storage.k8s.io/v1/volumeattachments/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/volumeattachments/{name}/status" + ] + } ] } ] @@ -2554,12 +2546,16 @@ { "name": "csistoragecapacities", "namespaced": true, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1alpha1", "group": "storage.k8s.io", "version": "v1alpha1", "kind": "CSIStorageCapacity", + "proto": "api.storage.v1alpha1.CSIStorageCapacity", "rust": "api::storage::v1alpha1::CSIStorageCapacity", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2587,17 +2583,22 @@ "/apis/storage.k8s.io/v1alpha1/csistoragecapacities", "/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities", "/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}" - ] + ], + "subresources": [] }, { "name": "volumeattachments", "namespaced": false, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1alpha1", "group": "storage.k8s.io", "version": "v1alpha1", "kind": "VolumeAttachment", + "proto": "api.storage.v1alpha1.VolumeAttachment", "rust": "api::storage::v1alpha1::VolumeAttachment", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1alpha1::VolumeAttachmentSpec", + "status": "api::storage::v1alpha1::VolumeAttachmentStatus", + "condition": null, "verbs": [ "create", "delete", @@ -2621,7 +2622,8 @@ "paths": [ "/apis/storage.k8s.io/v1alpha1/volumeattachments", "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" - ] + ], + "subresources": [] } ] }, @@ -2631,12 +2633,16 @@ { "name": "csistoragecapacities", "namespaced": true, - "subresource": false, "apiGroupVersion": "storage.k8s.io/v1beta1", "group": "storage.k8s.io", "version": "v1beta1", "kind": "CSIStorageCapacity", + "proto": "api.storage.v1beta1.CSIStorageCapacity", "rust": "api::storage::v1beta1::CSIStorageCapacity", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2664,7 +2670,8 @@ "/apis/storage.k8s.io/v1beta1/csistoragecapacities", "/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities", "/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}" - ] + ], + "subresources": [] } ] }, @@ -2674,12 +2681,16 @@ { "name": "bindings", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Binding", + "proto": "api.core.v1.Binding", "rust": "api::core::v1::Binding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create" ], @@ -2690,17 +2701,22 @@ }, "paths": [ "/api/v1/namespaces/{namespace}/bindings" - ] + ], + "subresources": [] }, { "name": "componentstatuses", "namespaced": false, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "ComponentStatus", + "proto": "api.core.v1.ComponentStatus", "rust": "api::core::v1::ComponentStatus", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "get", "list" @@ -2714,17 +2730,22 @@ "paths": [ "/api/v1/componentstatuses", "/api/v1/componentstatuses/{name}" - ] + ], + "subresources": [] }, { "name": "configmaps", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "ConfigMap", + "proto": "api.core.v1.ConfigMap", "rust": "api::core::v1::ConfigMap", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2752,17 +2773,22 @@ "/api/v1/configmaps", "/api/v1/namespaces/{namespace}/configmaps", "/api/v1/namespaces/{namespace}/configmaps/{name}" - ] + ], + "subresources": [] }, { "name": "endpoints", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Endpoints", + "proto": "api.core.v1.Endpoints", "rust": "api::core::v1::Endpoints", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2790,17 +2816,22 @@ "/api/v1/endpoints", "/api/v1/namespaces/{namespace}/endpoints", "/api/v1/namespaces/{namespace}/endpoints/{name}" - ] + ], + "subresources": [] }, { "name": "events", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Event", + "proto": "api.core.v1.Event", "rust": "api::core::v1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2828,17 +2859,22 @@ "/api/v1/events", "/api/v1/namespaces/{namespace}/events", "/api/v1/namespaces/{namespace}/events/{name}" - ] + ], + "subresources": [] }, { "name": "limitranges", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "LimitRange", + "proto": "api.core.v1.LimitRange", "rust": "api::core::v1::LimitRange", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::LimitRangeSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2866,17 +2902,22 @@ "/api/v1/limitranges", "/api/v1/namespaces/{namespace}/limitranges", "/api/v1/namespaces/{namespace}/limitranges/{name}" - ] + ], + "subresources": [] }, { "name": "namespaces", "namespaced": false, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Namespace", + "proto": "api.core.v1.Namespace", "rust": "api::core::v1::Namespace", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::NamespaceSpec", + "status": "api::core::v1::NamespaceStatus", + "condition": "api::core::v1::NamespaceCondition", "verbs": [ "create", "delete", @@ -2898,63 +2939,47 @@ "paths": [ "/api/v1/namespaces", "/api/v1/namespaces/{name}" - ] - }, - { - "name": "namespaces/finalize", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Namespace", - "rust": "api::core::v1::Namespace", - "verbs": [ - "update" ], - "scopedVerbs": { - "all": [ - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{name}/finalize" - ] - }, - { - "name": "namespaces/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Namespace", - "rust": "api::core::v1::Namespace", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{name}/status" + "subresources": [ + { + "name": "finalize", + "scopedVerbs": { + "all": [ + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/finalize" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/status" + ] + } ] }, { "name": "nodes", "namespaced": false, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Node", + "proto": "api.core.v1.Node", "rust": "api::core::v1::Node", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::NodeSpec", + "status": "api::core::v1::NodeStatus", + "condition": "api::core::v1::NodeCondition", "verbs": [ "create", "delete", @@ -2978,64 +3003,48 @@ "paths": [ "/api/v1/nodes", "/api/v1/nodes/{name}" - ] - }, - { - "name": "nodes/proxy", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Node", - "rust": "api::core::v1::Node", - "verbs": [ - "connect" - ], - "scopedVerbs": { - "all": [ - "connect" - ] - }, - "paths": [ - "/api/v1/nodes/{name}/proxy", - "/api/v1/nodes/{name}/proxy/{path}" - ] - }, - { - "name": "nodes/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Node", - "rust": "api::core::v1::Node", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/nodes/{name}/status" + "subresources": [ + { + "name": "proxy", + "scopedVerbs": { + "all": [ + "connect" + ] + }, + "paths": [ + "/api/v1/nodes/{name}/proxy", + "/api/v1/nodes/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/nodes/{name}/status" + ] + } ] }, { "name": "persistentvolumeclaims", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "PersistentVolumeClaim", + "proto": "api.core.v1.PersistentVolumeClaim", "rust": "api::core::v1::PersistentVolumeClaim", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::PersistentVolumeClaimSpec", + "status": "api::core::v1::PersistentVolumeClaimStatus", + "condition": "api::core::v1::PersistentVolumeClaimCondition", "verbs": [ "create", "delete", @@ -3063,42 +3072,36 @@ "/api/v1/persistentvolumeclaims", "/api/v1/namespaces/{namespace}/persistentvolumeclaims", "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}" - ] - }, - { - "name": "persistentvolumeclaims/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "PersistentVolumeClaim", - "rust": "api::core::v1::PersistentVolumeClaim", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status" + ] + } ] }, { "name": "persistentvolumes", "namespaced": false, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "PersistentVolume", + "proto": "api.core.v1.PersistentVolume", "rust": "api::core::v1::PersistentVolume", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::PersistentVolumeSpec", + "status": "api::core::v1::PersistentVolumeStatus", + "condition": null, "verbs": [ "create", "delete", @@ -3122,42 +3125,36 @@ "paths": [ "/api/v1/persistentvolumes", "/api/v1/persistentvolumes/{name}" - ] - }, - { - "name": "persistentvolumes/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "PersistentVolume", - "rust": "api::core::v1::PersistentVolume", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/persistentvolumes/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/persistentvolumes/{name}/status" + ] + } ] }, { "name": "pods", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Pod", + "proto": "api.core.v1.Pod", "rust": "api::core::v1::Pod", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "create", "delete", @@ -3185,215 +3182,127 @@ "/api/v1/pods", "/api/v1/namespaces/{namespace}/pods", "/api/v1/namespaces/{namespace}/pods/{name}" - ] - }, - { - "name": "pods/attach", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "connect" - ], - "scopedVerbs": { - "namespaced": [ - "connect" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/attach" - ] - }, - { - "name": "pods/binding", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Binding", - "rust": "api::core::v1::Binding", - "verbs": [ - "create" ], - "scopedVerbs": { - "namespaced": [ - "create" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/binding" - ] - }, - { - "name": "pods/ephemeralcontainers", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers" - ] - }, - { - "name": "pods/eviction", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "policy", - "version": "v1", - "kind": "Eviction", - "rust": "api::policy::v1::Eviction", - "verbs": [ - "create" - ], - "scopedVerbs": { - "namespaced": [ - "create" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/eviction" - ] - }, - { - "name": "pods/exec", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "connect" - ], - "scopedVerbs": { - "namespaced": [ - "connect" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/exec" - ] - }, - { - "name": "pods/log", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "get" - ], - "scopedVerbs": { - "namespaced": [ - "get" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/log" - ] - }, - { - "name": "pods/portforward", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "connect" - ], - "scopedVerbs": { - "namespaced": [ - "connect" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/portforward" - ] - }, - { - "name": "pods/proxy", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "connect" - ], - "scopedVerbs": { - "namespaced": [ - "connect" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/proxy", - "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}" - ] - }, - { - "name": "pods/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/pods/{name}/status" + "subresources": [ + { + "name": "attach", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/attach" + ] + }, + { + "name": "binding", + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/binding" + ] + }, + { + "name": "ephemeralcontainers", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers" + ] + }, + { + "name": "eviction", + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/eviction" + ] + }, + { + "name": "exec", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/exec" + ] + }, + { + "name": "log", + "scopedVerbs": { + "namespaced": [ + "get" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/log" + ] + }, + { + "name": "portforward", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/portforward" + ] + }, + { + "name": "proxy", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/proxy", + "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/status" + ] + } ] }, { "name": "podtemplates", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "PodTemplate", + "proto": "api.core.v1.PodTemplate", "rust": "api::core::v1::PodTemplate", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -3421,17 +3330,22 @@ "/api/v1/podtemplates", "/api/v1/namespaces/{namespace}/podtemplates", "/api/v1/namespaces/{namespace}/podtemplates/{name}" - ] + ], + "subresources": [] }, { "name": "replicationcontrollers", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "ReplicationController", + "proto": "api.core.v1.ReplicationController", "rust": "api::core::v1::ReplicationController", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::ReplicationControllerSpec", + "status": "api::core::v1::ReplicationControllerStatus", + "condition": "api::core::v1::ReplicationControllerCondition", "verbs": [ "create", "delete", @@ -3459,67 +3373,49 @@ "/api/v1/replicationcontrollers", "/api/v1/namespaces/{namespace}/replicationcontrollers", "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}" - ] - }, - { - "name": "replicationcontrollers/scale", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "autoscaling", - "version": "v1", - "kind": "Scale", - "rust": "api::autoscaling::v1::Scale", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale" - ] - }, - { - "name": "replicationcontrollers/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "ReplicationController", - "rust": "api::core::v1::ReplicationController", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status" + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status" + ] + } ] }, { "name": "resourcequotas", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "ResourceQuota", + "proto": "api.core.v1.ResourceQuota", "rust": "api::core::v1::ResourceQuota", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::ResourceQuotaSpec", + "status": "api::core::v1::ResourceQuotaStatus", + "condition": null, "verbs": [ "create", "delete", @@ -3547,42 +3443,36 @@ "/api/v1/resourcequotas", "/api/v1/namespaces/{namespace}/resourcequotas", "/api/v1/namespaces/{namespace}/resourcequotas/{name}" - ] - }, - { - "name": "resourcequotas/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "ResourceQuota", - "rust": "api::core::v1::ResourceQuota", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status" + ] + } ] }, { "name": "secrets", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Secret", + "proto": "api.core.v1.Secret", "rust": "api::core::v1::Secret", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -3610,17 +3500,22 @@ "/api/v1/secrets", "/api/v1/namespaces/{namespace}/secrets", "/api/v1/namespaces/{namespace}/secrets/{name}" - ] + ], + "subresources": [] }, { "name": "serviceaccounts", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "ServiceAccount", + "proto": "api.core.v1.ServiceAccount", "rust": "api::core::v1::ServiceAccount", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -3648,38 +3543,34 @@ "/api/v1/serviceaccounts", "/api/v1/namespaces/{namespace}/serviceaccounts", "/api/v1/namespaces/{namespace}/serviceaccounts/{name}" - ] - }, - { - "name": "serviceaccounts/token", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "authentication.k8s.io", - "version": "v1", - "kind": "TokenRequest", - "rust": "api::authentication::v1::TokenRequest", - "verbs": [ - "create" ], - "scopedVerbs": { - "namespaced": [ - "create" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token" + "subresources": [ + { + "name": "token", + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token" + ] + } ] }, { "name": "services", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Service", + "proto": "api.core.v1.Service", "rust": "api::core::v1::Service", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::ServiceSpec", + "status": "api::core::v1::ServiceStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "create", "delete", @@ -3705,53 +3596,33 @@ "/api/v1/services", "/api/v1/namespaces/{namespace}/services", "/api/v1/namespaces/{namespace}/services/{name}" - ] - }, - { - "name": "services/proxy", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Service", - "rust": "api::core::v1::Service", - "verbs": [ - "connect" - ], - "scopedVerbs": { - "namespaced": [ - "connect" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/services/{name}/proxy", - "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}" - ] - }, - { - "name": "services/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Service", - "rust": "api::core::v1::Service", - "verbs": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/services/{name}/status" + "subresources": [ + { + "name": "proxy", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/services/{name}/proxy", + "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/services/{name}/status" + ] + } ] } ] diff --git a/openapi/list-paths.jq b/k8s-pb-codegen/openapi/list-paths.jq similarity index 100% rename from openapi/list-paths.jq rename to k8s-pb-codegen/openapi/list-paths.jq diff --git a/openapi/list-resources.jq b/k8s-pb-codegen/openapi/list-resources.jq similarity index 56% rename from openapi/list-resources.jq rename to k8s-pb-codegen/openapi/list-resources.jq index 4389b54..e1e9e30 100644 --- a/openapi/list-resources.jq +++ b/k8s-pb-codegen/openapi/list-resources.jq @@ -1,17 +1,36 @@ +def fmap(f): if . != null then . | f else . end; +def to_rust: . | sub("^io\\.k8s\\."; "") | gsub("-"; "_") | gsub("\\."; "::"); +def strip_ref_prefix: . | sub("^#/definitions/"; ""); +# GVK object to slash separated string. +def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); + ( [ - .definitions | to_entries[] - | (.key | sub("^io\\.k8s\\."; "") | gsub("-"; "_") | gsub("\\."; "::")) as $path + .definitions as $defs + | .definitions | to_entries[] # Only process definitions with GVK array. # Exclude List. .properties.metadata.$ref "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" | .value["x-kubernetes-group-version-kind"]? as $gvks | select($gvks != null and ($gvks | length == 1) and (.value.properties?.metadata?["$ref"]? != "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta")) - | ($gvks[0] as $x | [$x.group, $x.version, $x.kind] | map(select(. != "")) | join("/")) as $gvk - | { key: $gvk, value: $path } + | (.value.properties?.metadata?["$ref"] | fmap(strip_ref_prefix | to_rust)) as $metadata + | (.value.properties?.spec?["$ref"] | fmap(strip_ref_prefix | to_rust)) as $spec + | (.value.properties?.status?["$ref"] | fmap(strip_ref_prefix)) as $statusName + | ($statusName | fmap($defs[.].properties?.conditions?.items?["$ref"]) | fmap(strip_ref_prefix | to_rust)) as $condition + | { + key: $gvks[0] | gvk_string, + value: { + proto: .key | sub("^io\\.k8s\\."; "") | gsub("-"; "_"), + rust: .key | to_rust, + metadata: $metadata, + spec: $spec, + status: $statusName | fmap(to_rust), + condition: $condition, + }, + } ] | sort_by(.key) | from_entries -) as $rustPaths +) as $definitions | [ .paths | to_entries[] @@ -26,6 +45,7 @@ # Fall back to method name. | .key as $method | (.value["x-kubernetes-action"] // $method) as $verb + | $definitions[$gvk | gvk_string] as $definition | { # Plural name. Includes a subresource name like in `APIResourceList`. name: ( @@ -42,7 +62,12 @@ group: $gvk.group, version: $gvk.version, subresource: ($path | test("\\{name\\}/")), - rust: $rustPaths[([$gvk.group, $gvk.version, $gvk.kind] | map(select(. != "")) | join("/"))], + proto: $definition.proto, + rust: $definition.rust, + metadata: $definition.metadata, + spec: $definition.spec, + status: $definition.status, + condition: $definition.condition, path: $path, } ] @@ -60,7 +85,12 @@ group: .[0].group, version: .[0].version, kind: .[0].kind, + proto: .[0].proto, rust: .[0].rust, + metadata: .[0].metadata, + spec: .[0].spec, + status: .[0].status, + condition: .[0].condition, verbs: (map(.verb) | unique), scopedVerbs: ( group_by(.namespaced) @@ -72,5 +102,19 @@ ), paths: (map(.path) | unique | sort_by(length)), }) + # Add subresource infos to parent and remove them + | [ + ([.[] | select(.subresource) | {name, scopedVerbs, paths}]) as $subresources + | .[] + | if .subresource then + . + else + (.name + "/") as $parent + | ([$subresources | .[] | select(.name | startswith($parent)) | {name: (.name | sub($parent; "")), scopedVerbs, paths}]) as $subs + | . + {subresources: $subs} + end + | select(.subresource | not) + | del(.subresource) + ] ) }) diff --git a/k8s-pb-codegen/openapi/patches/patch-nonexistent-gvk.jq b/k8s-pb-codegen/openapi/patches/patch-nonexistent-gvk.jq new file mode 100644 index 0000000..7cc267b --- /dev/null +++ b/k8s-pb-codegen/openapi/patches/patch-nonexistent-gvk.jq @@ -0,0 +1,13 @@ +# Fix path operation annotated with a `x-kubernetes-group-version-kind` that references a type that doesn't exist in the schema. +# See https://github.com/Arnavion/k8s-openapi/blob/445e89ec444ebb1c68e61361e64eec4c4a3f4785/k8s-openapi-codegen/src/fixups/upstream_bugs.rs#L9 +(.paths | .. | objects | select((.group? == "") and (.version? == "v1") and (.kind? | type) == "string")).kind |= ( + if . | test("^Pod(?:Attach|Exec|PortForward|Proxy)Options$") then + "Pod" + elif . == "NodeProxyOptions" then + "Node" + elif . == "ServiceProxyOptions" then + "Service" + else + . + end +) diff --git a/openapi/swagger.json b/k8s-pb-codegen/openapi/swagger.json similarity index 100% rename from openapi/swagger.json rename to k8s-pb-codegen/openapi/swagger.json diff --git a/k8s-pb-codegen/openapi/transform.jq b/k8s-pb-codegen/openapi/transform.jq new file mode 100644 index 0000000..7eac8e1 --- /dev/null +++ b/k8s-pb-codegen/openapi/transform.jq @@ -0,0 +1,160 @@ +# Transform `swagger.json` to a map of proto path to resource infos. +def fmap(f): if . != null then . | f else . end; +def to_rust: . | sub("^io\\.k8s\\."; "") | gsub("-"; "_") | gsub("\\."; "::"); +def strip_ref_prefix: . | sub("^#/definitions/"; ""); +# GVK object to slash separated string. +def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); + +( + [ + .definitions as $defs | + .definitions | + to_entries[] | + # Only process definitions with GVK array. + # Exclude List. .properties.metadata.$ref "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + .value["x-kubernetes-group-version-kind"]? as $gvks | + select( + $gvks != null and + ($gvks | length == 1) and + (.value.properties?.metadata?["$ref"]? != "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta") + ) | + (.value.properties?.metadata?["$ref"] | fmap(strip_ref_prefix | to_rust)) as $metadata | + (.value.properties?.spec?["$ref"] | fmap(strip_ref_prefix | to_rust)) as $spec | + (.value.properties?.status?["$ref"] | fmap(strip_ref_prefix)) as $statusName | + ( + $statusName | + fmap($defs[.].properties?.conditions?.items?["$ref"]) | + fmap(strip_ref_prefix | to_rust) + ) as $condition | + { + key: $gvks[0] | gvk_string, + value: { + proto: .key | sub("^io\\.k8s\\."; "") | gsub("-"; "_"), + rust: .key | to_rust, + metadata: $metadata, + spec: $spec, + status: $statusName | fmap(to_rust), + condition: $condition, + }, + } + ] | + sort_by(.key) | + from_entries +) as $definitions | + +[ + .paths | + to_entries[] | + .key as $path | + .value | + to_entries[] | + # Only process path infos with GVK (methods) and ignore deprecated. + .value["x-kubernetes-group-version-kind"]? as $gvk | + select($gvk != null and (.value.description | test("deprecated: "; "i") | not)) | + # Use group and version from path to group by because subresource's GVK might be different. + # e.g., `autoscale/v1` in `apps/v1`. + ( + $path | + capture("^/(?:(?:api/(?[^/]+))|(?:apis/(?[^/]+)/(?[^/]+)))/") + ) as $gv | + ( + if $gv.coreVersion != null then + "\($gv.coreVersion)" + else + "\($gv.group)/\($gv.version)" + end + ) as $apiGroupVersion | + # Fall back to method name. + (.value["x-kubernetes-action"] // .key) as $verb | + $definitions[$gvk | gvk_string] as $definition | + { + # Plural name. Includes a subresource name like in `APIResourceList`. + name: ( + $path | + sub("^/apis?/\($apiGroupVersion)/(?:namespaces/\\{namespace\\}/)?"; "") | + split("/") | + map(select(. | (startswith("{") | not))) | + join("/") + ), + namespaced: ($path | test("/namespaces/\\{namespace\\}/")), + kind: $gvk.kind, + verb: (if $verb == "post" then "create" elif $verb == "put" then "update" else $verb end), + apiGroupVersion: $apiGroupVersion, + group: $gvk.group, + version: $gvk.version, + subresource: ($path | test("\\{name\\}/")), + proto: $definition.proto, + rust: $definition.rust, + metadata: $definition.metadata, + spec: $definition.spec, + status: $definition.status, + condition: $definition.condition, + path: $path, + } +] | +# Group resources by `apiGroupVersion` like `APIResourceList`, then +# combine subresources within the group with the parent. +group_by(.apiGroupVersion) | +map({ + apiGroupVersion: .[0].apiGroupVersion, + # Collect all `paths` and `scopedVerbs` for this resource/subresource. + resources: ( + group_by(.name) | + map({ + name: .[0].name, + # Some resources can be both namespaced and cluster scoped. + # `namespaced` is true if it can be namespaced. + namespaced: (map(.namespaced) | any), + subresource: .[0].subresource, + apiGroupVersion: .[0].apiGroupVersion, + group: .[0].group, + version: .[0].version, + kind: .[0].kind, + proto: .[0].proto, + rust: .[0].rust, + metadata: .[0].metadata, + spec: .[0].spec, + status: .[0].status, + condition: .[0].condition, + scopedVerbs: ( + group_by(.namespaced) | + map({ + key: (if .[0].namespaced then "namespaced" else "all" end), + value: (map(.verb) | unique) + }) | + from_entries + ), + paths: (map(.path) | unique | sort_by(length)), + }) | + # Add subresource infos to parent and remove them + ([.[] | select(.subresource) | {name, scopedVerbs, paths}]) as $subresources | + [ + .[] | + select(.subresource | not) | + (.name + "/") as $parent | + . + + { + subresources: [ + $subresources | + .[] | + select(.name | startswith($parent)) | + { + name: (.name | sub($parent; "")), + scopedVerbs, + paths + } + ] + } | + del(.subresource) + ] as $resources | + # basic sanity check + if ($resources | map(.subresources | length) | add) == ($subresources | length) then + $resources + else + error("some subresources were not associated with their parent") + end + ) +}) | +[.[].resources[] | {key: .proto, value: .}] | +sort_by(.key) | +from_entries diff --git a/k8s-pb-codegen/openapi/transformed.json b/k8s-pb-codegen/openapi/transformed.json new file mode 100644 index 0000000..33806f0 --- /dev/null +++ b/k8s-pb-codegen/openapi/transformed.json @@ -0,0 +1,2860 @@ +{ + "api.admissionregistration.v1.MutatingWebhookConfiguration": { + "name": "mutatingwebhookconfigurations", + "namespaced": false, + "apiGroupVersion": "admissionregistration.k8s.io/v1", + "group": "admissionregistration.k8s.io", + "version": "v1", + "kind": "MutatingWebhookConfiguration", + "proto": "api.admissionregistration.v1.MutatingWebhookConfiguration", + "rust": "api::admissionregistration::v1::MutatingWebhookConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations", + "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" + ], + "subresources": [] + }, + "api.admissionregistration.v1.ValidatingWebhookConfiguration": { + "name": "validatingwebhookconfigurations", + "namespaced": false, + "apiGroupVersion": "admissionregistration.k8s.io/v1", + "group": "admissionregistration.k8s.io", + "version": "v1", + "kind": "ValidatingWebhookConfiguration", + "proto": "api.admissionregistration.v1.ValidatingWebhookConfiguration", + "rust": "api::admissionregistration::v1::ValidatingWebhookConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations", + "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" + ], + "subresources": [] + }, + "api.apiserverinternal.v1alpha1.StorageVersion": { + "name": "storageversions", + "namespaced": false, + "apiGroupVersion": "internal.apiserver.k8s.io/v1alpha1", + "group": "internal.apiserver.k8s.io", + "version": "v1alpha1", + "kind": "StorageVersion", + "proto": "api.apiserverinternal.v1alpha1.StorageVersion", + "rust": "api::apiserverinternal::v1alpha1::StorageVersion", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apiserverinternal::v1alpha1::StorageVersionSpec", + "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", + "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions", + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status" + ] + } + ] + }, + "api.apps.v1.ControllerRevision": { + "name": "controllerrevisions", + "namespaced": true, + "apiGroupVersion": "apps/v1", + "group": "apps", + "version": "v1", + "kind": "ControllerRevision", + "proto": "api.apps.v1.ControllerRevision", + "rust": "api::apps::v1::ControllerRevision", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/controllerrevisions", + "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", + "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" + ], + "subresources": [] + }, + "api.apps.v1.DaemonSet": { + "name": "daemonsets", + "namespaced": true, + "apiGroupVersion": "apps/v1", + "group": "apps", + "version": "v1", + "kind": "DaemonSet", + "proto": "api.apps.v1.DaemonSet", + "rust": "api::apps::v1::DaemonSet", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::DaemonSetSpec", + "status": "api::apps::v1::DaemonSetStatus", + "condition": "api::apps::v1::DaemonSetCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/daemonsets", + "/apis/apps/v1/namespaces/{namespace}/daemonsets", + "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status" + ] + } + ] + }, + "api.apps.v1.Deployment": { + "name": "deployments", + "namespaced": true, + "apiGroupVersion": "apps/v1", + "group": "apps", + "version": "v1", + "kind": "Deployment", + "proto": "api.apps.v1.Deployment", + "rust": "api::apps::v1::Deployment", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::DeploymentSpec", + "status": "api::apps::v1::DeploymentStatus", + "condition": "api::apps::v1::DeploymentCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/deployments", + "/apis/apps/v1/namespaces/{namespace}/deployments", + "/apis/apps/v1/namespaces/{namespace}/deployments/{name}" + ], + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status" + ] + } + ] + }, + "api.apps.v1.ReplicaSet": { + "name": "replicasets", + "namespaced": true, + "apiGroupVersion": "apps/v1", + "group": "apps", + "version": "v1", + "kind": "ReplicaSet", + "proto": "api.apps.v1.ReplicaSet", + "rust": "api::apps::v1::ReplicaSet", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::ReplicaSetSpec", + "status": "api::apps::v1::ReplicaSetStatus", + "condition": "api::apps::v1::ReplicaSetCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/replicasets", + "/apis/apps/v1/namespaces/{namespace}/replicasets", + "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}" + ], + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status" + ] + } + ] + }, + "api.apps.v1.StatefulSet": { + "name": "statefulsets", + "namespaced": true, + "apiGroupVersion": "apps/v1", + "group": "apps", + "version": "v1", + "kind": "StatefulSet", + "proto": "api.apps.v1.StatefulSet", + "rust": "api::apps::v1::StatefulSet", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::apps::v1::StatefulSetSpec", + "status": "api::apps::v1::StatefulSetStatus", + "condition": "api::apps::v1::StatefulSetCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/statefulsets", + "/apis/apps/v1/namespaces/{namespace}/statefulsets", + "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}" + ], + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status" + ] + } + ] + }, + "api.authentication.v1.TokenReview": { + "name": "tokenreviews", + "namespaced": false, + "apiGroupVersion": "authentication.k8s.io/v1", + "group": "authentication.k8s.io", + "version": "v1", + "kind": "TokenReview", + "proto": "api.authentication.v1.TokenReview", + "rust": "api::authentication::v1::TokenReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authentication::v1::TokenReviewSpec", + "status": "api::authentication::v1::TokenReviewStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create" + ] + }, + "paths": [ + "/apis/authentication.k8s.io/v1/tokenreviews" + ], + "subresources": [] + }, + "api.authorization.v1.LocalSubjectAccessReview": { + "name": "localsubjectaccessreviews", + "namespaced": true, + "apiGroupVersion": "authorization.k8s.io/v1", + "group": "authorization.k8s.io", + "version": "v1", + "kind": "LocalSubjectAccessReview", + "proto": "api.authorization.v1.LocalSubjectAccessReview", + "rust": "api::authorization::v1::LocalSubjectAccessReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews" + ], + "subresources": [] + }, + "api.authorization.v1.SelfSubjectAccessReview": { + "name": "selfsubjectaccessreviews", + "namespaced": false, + "apiGroupVersion": "authorization.k8s.io/v1", + "group": "authorization.k8s.io", + "version": "v1", + "kind": "SelfSubjectAccessReview", + "proto": "api.authorization.v1.SelfSubjectAccessReview", + "rust": "api::authorization::v1::SelfSubjectAccessReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SelfSubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create" + ] + }, + "paths": [ + "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews" + ], + "subresources": [] + }, + "api.authorization.v1.SelfSubjectRulesReview": { + "name": "selfsubjectrulesreviews", + "namespaced": false, + "apiGroupVersion": "authorization.k8s.io/v1", + "group": "authorization.k8s.io", + "version": "v1", + "kind": "SelfSubjectRulesReview", + "proto": "api.authorization.v1.SelfSubjectRulesReview", + "rust": "api::authorization::v1::SelfSubjectRulesReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SelfSubjectRulesReviewSpec", + "status": "api::authorization::v1::SubjectRulesReviewStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create" + ] + }, + "paths": [ + "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews" + ], + "subresources": [] + }, + "api.authorization.v1.SubjectAccessReview": { + "name": "subjectaccessreviews", + "namespaced": false, + "apiGroupVersion": "authorization.k8s.io/v1", + "group": "authorization.k8s.io", + "version": "v1", + "kind": "SubjectAccessReview", + "proto": "api.authorization.v1.SubjectAccessReview", + "rust": "api::authorization::v1::SubjectAccessReview", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::authorization::v1::SubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create" + ] + }, + "paths": [ + "/apis/authorization.k8s.io/v1/subjectaccessreviews" + ], + "subresources": [] + }, + "api.autoscaling.v1.HorizontalPodAutoscaler": { + "name": "horizontalpodautoscalers", + "namespaced": true, + "apiGroupVersion": "autoscaling/v1", + "group": "autoscaling", + "version": "v1", + "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v1.HorizontalPodAutoscaler", + "rust": "api::autoscaling::v1::HorizontalPodAutoscaler", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::autoscaling::v1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v1::HorizontalPodAutoscalerStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v1/horizontalpodautoscalers", + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers", + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } + ] + }, + "api.autoscaling.v2beta1.HorizontalPodAutoscaler": { + "name": "horizontalpodautoscalers", + "namespaced": true, + "apiGroupVersion": "autoscaling/v2beta1", + "group": "autoscaling", + "version": "v2beta1", + "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v2beta1.HorizontalPodAutoscaler", + "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta1::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta1::HorizontalPodAutoscalerCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta1/horizontalpodautoscalers", + "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers", + "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } + ] + }, + "api.autoscaling.v2beta2.HorizontalPodAutoscaler": { + "name": "horizontalpodautoscalers", + "namespaced": true, + "apiGroupVersion": "autoscaling/v2beta2", + "group": "autoscaling", + "version": "v2beta2", + "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v2beta2.HorizontalPodAutoscaler", + "rust": "api::autoscaling::v2beta2::HorizontalPodAutoscaler", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::autoscaling::v2beta2::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta2::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta2::HorizontalPodAutoscalerCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta2/horizontalpodautoscalers", + "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers", + "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } + ] + }, + "api.batch.v1.CronJob": { + "name": "cronjobs", + "namespaced": true, + "apiGroupVersion": "batch/v1", + "group": "batch", + "version": "v1", + "kind": "CronJob", + "proto": "api.batch.v1.CronJob", + "rust": "api::batch::v1::CronJob", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::batch::v1::CronJobSpec", + "status": "api::batch::v1::CronJobStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/cronjobs", + "/apis/batch/v1/namespaces/{namespace}/cronjobs", + "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status" + ] + } + ] + }, + "api.batch.v1.Job": { + "name": "jobs", + "namespaced": true, + "apiGroupVersion": "batch/v1", + "group": "batch", + "version": "v1", + "kind": "Job", + "proto": "api.batch.v1.Job", + "rust": "api::batch::v1::Job", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::batch::v1::JobSpec", + "status": "api::batch::v1::JobStatus", + "condition": "api::batch::v1::JobCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/jobs", + "/apis/batch/v1/namespaces/{namespace}/jobs", + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status" + ] + } + ] + }, + "api.batch.v1beta1.CronJob": { + "name": "cronjobs", + "namespaced": true, + "apiGroupVersion": "batch/v1beta1", + "group": "batch", + "version": "v1beta1", + "kind": "CronJob", + "proto": "api.batch.v1beta1.CronJob", + "rust": "api::batch::v1beta1::CronJob", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::batch::v1beta1::CronJobSpec", + "status": "api::batch::v1beta1::CronJobStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1beta1/cronjobs", + "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs", + "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status" + ] + } + ] + }, + "api.certificates.v1.CertificateSigningRequest": { + "name": "certificatesigningrequests", + "namespaced": false, + "apiGroupVersion": "certificates.k8s.io/v1", + "group": "certificates.k8s.io", + "version": "v1", + "kind": "CertificateSigningRequest", + "proto": "api.certificates.v1.CertificateSigningRequest", + "rust": "api::certificates::v1::CertificateSigningRequest", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::certificates::v1::CertificateSigningRequestSpec", + "status": "api::certificates::v1::CertificateSigningRequestStatus", + "condition": "api::certificates::v1::CertificateSigningRequestCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/certificates.k8s.io/v1/certificatesigningrequests", + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}" + ], + "subresources": [ + { + "name": "approval", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status" + ] + } + ] + }, + "api.coordination.v1.Lease": { + "name": "leases", + "namespaced": true, + "apiGroupVersion": "coordination.k8s.io/v1", + "group": "coordination.k8s.io", + "version": "v1", + "kind": "Lease", + "proto": "api.coordination.v1.Lease", + "rust": "api::coordination::v1::Lease", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::coordination::v1::LeaseSpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/coordination.k8s.io/v1/leases", + "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases", + "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}" + ], + "subresources": [] + }, + "api.core.v1.Binding": { + "name": "bindings", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Binding", + "proto": "api.core.v1.Binding", + "rust": "api::core::v1::Binding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/bindings" + ], + "subresources": [] + }, + "api.core.v1.ComponentStatus": { + "name": "componentstatuses", + "namespaced": false, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "ComponentStatus", + "proto": "api.core.v1.ComponentStatus", + "rust": "api::core::v1::ComponentStatus", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "get", + "list" + ] + }, + "paths": [ + "/api/v1/componentstatuses", + "/api/v1/componentstatuses/{name}" + ], + "subresources": [] + }, + "api.core.v1.ConfigMap": { + "name": "configmaps", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "ConfigMap", + "proto": "api.core.v1.ConfigMap", + "rust": "api::core::v1::ConfigMap", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/configmaps", + "/api/v1/namespaces/{namespace}/configmaps", + "/api/v1/namespaces/{namespace}/configmaps/{name}" + ], + "subresources": [] + }, + "api.core.v1.Endpoints": { + "name": "endpoints", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Endpoints", + "proto": "api.core.v1.Endpoints", + "rust": "api::core::v1::Endpoints", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/endpoints", + "/api/v1/namespaces/{namespace}/endpoints", + "/api/v1/namespaces/{namespace}/endpoints/{name}" + ], + "subresources": [] + }, + "api.core.v1.Event": { + "name": "events", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Event", + "proto": "api.core.v1.Event", + "rust": "api::core::v1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/events", + "/api/v1/namespaces/{namespace}/events", + "/api/v1/namespaces/{namespace}/events/{name}" + ], + "subresources": [] + }, + "api.core.v1.LimitRange": { + "name": "limitranges", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "LimitRange", + "proto": "api.core.v1.LimitRange", + "rust": "api::core::v1::LimitRange", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::LimitRangeSpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/limitranges", + "/api/v1/namespaces/{namespace}/limitranges", + "/api/v1/namespaces/{namespace}/limitranges/{name}" + ], + "subresources": [] + }, + "api.core.v1.Namespace": { + "name": "namespaces", + "namespaced": false, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Namespace", + "proto": "api.core.v1.Namespace", + "rust": "api::core::v1::Namespace", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::NamespaceSpec", + "status": "api::core::v1::NamespaceStatus", + "condition": "api::core::v1::NamespaceCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces", + "/api/v1/namespaces/{name}" + ], + "subresources": [ + { + "name": "finalize", + "scopedVerbs": { + "all": [ + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/finalize" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/status" + ] + } + ] + }, + "api.core.v1.Node": { + "name": "nodes", + "namespaced": false, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Node", + "proto": "api.core.v1.Node", + "rust": "api::core::v1::Node", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::NodeSpec", + "status": "api::core::v1::NodeStatus", + "condition": "api::core::v1::NodeCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/nodes", + "/api/v1/nodes/{name}" + ], + "subresources": [ + { + "name": "proxy", + "scopedVerbs": { + "all": [ + "connect" + ] + }, + "paths": [ + "/api/v1/nodes/{name}/proxy", + "/api/v1/nodes/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/nodes/{name}/status" + ] + } + ] + }, + "api.core.v1.PersistentVolume": { + "name": "persistentvolumes", + "namespaced": false, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "PersistentVolume", + "proto": "api.core.v1.PersistentVolume", + "rust": "api::core::v1::PersistentVolume", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::PersistentVolumeSpec", + "status": "api::core::v1::PersistentVolumeStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/persistentvolumes", + "/api/v1/persistentvolumes/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/persistentvolumes/{name}/status" + ] + } + ] + }, + "api.core.v1.PersistentVolumeClaim": { + "name": "persistentvolumeclaims", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "PersistentVolumeClaim", + "proto": "api.core.v1.PersistentVolumeClaim", + "rust": "api::core::v1::PersistentVolumeClaim", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::PersistentVolumeClaimSpec", + "status": "api::core::v1::PersistentVolumeClaimStatus", + "condition": "api::core::v1::PersistentVolumeClaimCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/persistentvolumeclaims", + "/api/v1/namespaces/{namespace}/persistentvolumeclaims", + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status" + ] + } + ] + }, + "api.core.v1.Pod": { + "name": "pods", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Pod", + "proto": "api.core.v1.Pod", + "rust": "api::core::v1::Pod", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/pods", + "/api/v1/namespaces/{namespace}/pods", + "/api/v1/namespaces/{namespace}/pods/{name}" + ], + "subresources": [ + { + "name": "attach", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/attach" + ] + }, + { + "name": "binding", + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/binding" + ] + }, + { + "name": "ephemeralcontainers", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers" + ] + }, + { + "name": "eviction", + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/eviction" + ] + }, + { + "name": "exec", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/exec" + ] + }, + { + "name": "log", + "scopedVerbs": { + "namespaced": [ + "get" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/log" + ] + }, + { + "name": "portforward", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/portforward" + ] + }, + { + "name": "proxy", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/proxy", + "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/pods/{name}/status" + ] + } + ] + }, + "api.core.v1.PodTemplate": { + "name": "podtemplates", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "PodTemplate", + "proto": "api.core.v1.PodTemplate", + "rust": "api::core::v1::PodTemplate", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/podtemplates", + "/api/v1/namespaces/{namespace}/podtemplates", + "/api/v1/namespaces/{namespace}/podtemplates/{name}" + ], + "subresources": [] + }, + "api.core.v1.ReplicationController": { + "name": "replicationcontrollers", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "ReplicationController", + "proto": "api.core.v1.ReplicationController", + "rust": "api::core::v1::ReplicationController", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::ReplicationControllerSpec", + "status": "api::core::v1::ReplicationControllerStatus", + "condition": "api::core::v1::ReplicationControllerCondition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/replicationcontrollers", + "/api/v1/namespaces/{namespace}/replicationcontrollers", + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}" + ], + "subresources": [ + { + "name": "scale", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status" + ] + } + ] + }, + "api.core.v1.ResourceQuota": { + "name": "resourcequotas", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "ResourceQuota", + "proto": "api.core.v1.ResourceQuota", + "rust": "api::core::v1::ResourceQuota", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::ResourceQuotaSpec", + "status": "api::core::v1::ResourceQuotaStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/resourcequotas", + "/api/v1/namespaces/{namespace}/resourcequotas", + "/api/v1/namespaces/{namespace}/resourcequotas/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status" + ] + } + ] + }, + "api.core.v1.Secret": { + "name": "secrets", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Secret", + "proto": "api.core.v1.Secret", + "rust": "api::core::v1::Secret", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/secrets", + "/api/v1/namespaces/{namespace}/secrets", + "/api/v1/namespaces/{namespace}/secrets/{name}" + ], + "subresources": [] + }, + "api.core.v1.Service": { + "name": "services", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "Service", + "proto": "api.core.v1.Service", + "rust": "api::core::v1::Service", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::core::v1::ServiceSpec", + "status": "api::core::v1::ServiceStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/services", + "/api/v1/namespaces/{namespace}/services", + "/api/v1/namespaces/{namespace}/services/{name}" + ], + "subresources": [ + { + "name": "proxy", + "scopedVerbs": { + "namespaced": [ + "connect" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/services/{name}/proxy", + "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/services/{name}/status" + ] + } + ] + }, + "api.core.v1.ServiceAccount": { + "name": "serviceaccounts", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", + "version": "v1", + "kind": "ServiceAccount", + "proto": "api.core.v1.ServiceAccount", + "rust": "api::core::v1::ServiceAccount", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/serviceaccounts", + "/api/v1/namespaces/{namespace}/serviceaccounts", + "/api/v1/namespaces/{namespace}/serviceaccounts/{name}" + ], + "subresources": [ + { + "name": "token", + "scopedVerbs": { + "namespaced": [ + "create" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token" + ] + } + ] + }, + "api.discovery.v1.EndpointSlice": { + "name": "endpointslices", + "namespaced": true, + "apiGroupVersion": "discovery.k8s.io/v1", + "group": "discovery.k8s.io", + "version": "v1", + "kind": "EndpointSlice", + "proto": "api.discovery.v1.EndpointSlice", + "rust": "api::discovery::v1::EndpointSlice", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/discovery.k8s.io/v1/endpointslices", + "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices", + "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}" + ], + "subresources": [] + }, + "api.discovery.v1beta1.EndpointSlice": { + "name": "endpointslices", + "namespaced": true, + "apiGroupVersion": "discovery.k8s.io/v1beta1", + "group": "discovery.k8s.io", + "version": "v1beta1", + "kind": "EndpointSlice", + "proto": "api.discovery.v1beta1.EndpointSlice", + "rust": "api::discovery::v1beta1::EndpointSlice", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/discovery.k8s.io/v1beta1/endpointslices", + "/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices", + "/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}" + ], + "subresources": [] + }, + "api.events.v1.Event": { + "name": "events", + "namespaced": true, + "apiGroupVersion": "events.k8s.io/v1", + "group": "events.k8s.io", + "version": "v1", + "kind": "Event", + "proto": "api.events.v1.Event", + "rust": "api::events::v1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/events.k8s.io/v1/events", + "/apis/events.k8s.io/v1/namespaces/{namespace}/events", + "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}" + ], + "subresources": [] + }, + "api.events.v1beta1.Event": { + "name": "events", + "namespaced": true, + "apiGroupVersion": "events.k8s.io/v1beta1", + "group": "events.k8s.io", + "version": "v1beta1", + "kind": "Event", + "proto": "api.events.v1beta1.Event", + "rust": "api::events::v1beta1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/events.k8s.io/v1beta1/events", + "/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events", + "/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}" + ], + "subresources": [] + }, + "api.flowcontrol.v1beta1.FlowSchema": { + "name": "flowschemas", + "namespaced": false, + "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "group": "flowcontrol.apiserver.k8s.io", + "version": "v1beta1", + "kind": "FlowSchema", + "proto": "api.flowcontrol.v1beta1.FlowSchema", + "rust": "api::flowcontrol::v1beta1::FlowSchema", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::flowcontrol::v1beta1::FlowSchemaSpec", + "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", + "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas", + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status" + ] + } + ] + }, + "api.flowcontrol.v1beta1.PriorityLevelConfiguration": { + "name": "prioritylevelconfigurations", + "namespaced": false, + "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "group": "flowcontrol.apiserver.k8s.io", + "version": "v1beta1", + "kind": "PriorityLevelConfiguration", + "proto": "api.flowcontrol.v1beta1.PriorityLevelConfiguration", + "rust": "api::flowcontrol::v1beta1::PriorityLevelConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::flowcontrol::v1beta1::PriorityLevelConfigurationSpec", + "status": "api::flowcontrol::v1beta1::PriorityLevelConfigurationStatus", + "condition": "api::flowcontrol::v1beta1::PriorityLevelConfigurationCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations", + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" + ] + } + ] + }, + "api.networking.v1.Ingress": { + "name": "ingresses", + "namespaced": true, + "apiGroupVersion": "networking.k8s.io/v1", + "group": "networking.k8s.io", + "version": "v1", + "kind": "Ingress", + "proto": "api.networking.v1.Ingress", + "rust": "api::networking::v1::Ingress", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::networking::v1::IngressSpec", + "status": "api::networking::v1::IngressStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/networking.k8s.io/v1/ingresses", + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses", + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" + ] + } + ] + }, + "api.networking.v1.IngressClass": { + "name": "ingressclasses", + "namespaced": false, + "apiGroupVersion": "networking.k8s.io/v1", + "group": "networking.k8s.io", + "version": "v1", + "kind": "IngressClass", + "proto": "api.networking.v1.IngressClass", + "rust": "api::networking::v1::IngressClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::networking::v1::IngressClassSpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/networking.k8s.io/v1/ingressclasses", + "/apis/networking.k8s.io/v1/ingressclasses/{name}" + ], + "subresources": [] + }, + "api.networking.v1.NetworkPolicy": { + "name": "networkpolicies", + "namespaced": true, + "apiGroupVersion": "networking.k8s.io/v1", + "group": "networking.k8s.io", + "version": "v1", + "kind": "NetworkPolicy", + "proto": "api.networking.v1.NetworkPolicy", + "rust": "api::networking::v1::NetworkPolicy", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::networking::v1::NetworkPolicySpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/networking.k8s.io/v1/networkpolicies", + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies", + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" + ], + "subresources": [] + }, + "api.node.v1.RuntimeClass": { + "name": "runtimeclasses", + "namespaced": false, + "apiGroupVersion": "node.k8s.io/v1", + "group": "node.k8s.io", + "version": "v1", + "kind": "RuntimeClass", + "proto": "api.node.v1.RuntimeClass", + "rust": "api::node::v1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/node.k8s.io/v1/runtimeclasses", + "/apis/node.k8s.io/v1/runtimeclasses/{name}" + ], + "subresources": [] + }, + "api.node.v1alpha1.RuntimeClass": { + "name": "runtimeclasses", + "namespaced": false, + "apiGroupVersion": "node.k8s.io/v1alpha1", + "group": "node.k8s.io", + "version": "v1alpha1", + "kind": "RuntimeClass", + "proto": "api.node.v1alpha1.RuntimeClass", + "rust": "api::node::v1alpha1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::node::v1alpha1::RuntimeClassSpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/node.k8s.io/v1alpha1/runtimeclasses", + "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" + ], + "subresources": [] + }, + "api.node.v1beta1.RuntimeClass": { + "name": "runtimeclasses", + "namespaced": false, + "apiGroupVersion": "node.k8s.io/v1beta1", + "group": "node.k8s.io", + "version": "v1beta1", + "kind": "RuntimeClass", + "proto": "api.node.v1beta1.RuntimeClass", + "rust": "api::node::v1beta1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/node.k8s.io/v1beta1/runtimeclasses", + "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" + ], + "subresources": [] + }, + "api.policy.v1.PodDisruptionBudget": { + "name": "poddisruptionbudgets", + "namespaced": true, + "apiGroupVersion": "policy/v1", + "group": "policy", + "version": "v1", + "kind": "PodDisruptionBudget", + "proto": "api.policy.v1.PodDisruptionBudget", + "rust": "api::policy::v1::PodDisruptionBudget", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::policy::v1::PodDisruptionBudgetSpec", + "status": "api::policy::v1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1/poddisruptionbudgets", + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets", + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } + ] + }, + "api.policy.v1beta1.PodDisruptionBudget": { + "name": "poddisruptionbudgets", + "namespaced": true, + "apiGroupVersion": "policy/v1beta1", + "group": "policy", + "version": "v1beta1", + "kind": "PodDisruptionBudget", + "proto": "api.policy.v1beta1.PodDisruptionBudget", + "rust": "api::policy::v1beta1::PodDisruptionBudget", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::policy::v1beta1::PodDisruptionBudgetSpec", + "status": "api::policy::v1beta1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1beta1/poddisruptionbudgets", + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets", + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } + ] + }, + "api.policy.v1beta1.PodSecurityPolicy": { + "name": "podsecuritypolicies", + "namespaced": false, + "apiGroupVersion": "policy/v1beta1", + "group": "policy", + "version": "v1beta1", + "kind": "PodSecurityPolicy", + "proto": "api.policy.v1beta1.PodSecurityPolicy", + "rust": "api::policy::v1beta1::PodSecurityPolicy", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::policy::v1beta1::PodSecurityPolicySpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1beta1/podsecuritypolicies", + "/apis/policy/v1beta1/podsecuritypolicies/{name}" + ], + "subresources": [] + }, + "api.rbac.v1.ClusterRole": { + "name": "clusterroles", + "namespaced": false, + "apiGroupVersion": "rbac.authorization.k8s.io/v1", + "group": "rbac.authorization.k8s.io", + "version": "v1", + "kind": "ClusterRole", + "proto": "api.rbac.v1.ClusterRole", + "rust": "api::rbac::v1::ClusterRole", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1/clusterroles", + "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}" + ], + "subresources": [] + }, + "api.rbac.v1.ClusterRoleBinding": { + "name": "clusterrolebindings", + "namespaced": false, + "apiGroupVersion": "rbac.authorization.k8s.io/v1", + "group": "rbac.authorization.k8s.io", + "version": "v1", + "kind": "ClusterRoleBinding", + "proto": "api.rbac.v1.ClusterRoleBinding", + "rust": "api::rbac::v1::ClusterRoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings", + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}" + ], + "subresources": [] + }, + "api.rbac.v1.Role": { + "name": "roles", + "namespaced": true, + "apiGroupVersion": "rbac.authorization.k8s.io/v1", + "group": "rbac.authorization.k8s.io", + "version": "v1", + "kind": "Role", + "proto": "api.rbac.v1.Role", + "rust": "api::rbac::v1::Role", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1/roles", + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles", + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}" + ], + "subresources": [] + }, + "api.rbac.v1.RoleBinding": { + "name": "rolebindings", + "namespaced": true, + "apiGroupVersion": "rbac.authorization.k8s.io/v1", + "group": "rbac.authorization.k8s.io", + "version": "v1", + "kind": "RoleBinding", + "proto": "api.rbac.v1.RoleBinding", + "rust": "api::rbac::v1::RoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1/rolebindings", + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings", + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}" + ], + "subresources": [] + }, + "api.rbac.v1alpha1.ClusterRole": { + "name": "clusterroles", + "namespaced": false, + "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", + "group": "rbac.authorization.k8s.io", + "version": "v1alpha1", + "kind": "ClusterRole", + "proto": "api.rbac.v1alpha1.ClusterRole", + "rust": "api::rbac::v1alpha1::ClusterRole", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles", + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}" + ], + "subresources": [] + }, + "api.rbac.v1alpha1.ClusterRoleBinding": { + "name": "clusterrolebindings", + "namespaced": false, + "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", + "group": "rbac.authorization.k8s.io", + "version": "v1alpha1", + "kind": "ClusterRoleBinding", + "proto": "api.rbac.v1alpha1.ClusterRoleBinding", + "rust": "api::rbac::v1alpha1::ClusterRoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings", + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}" + ], + "subresources": [] + }, + "api.rbac.v1alpha1.Role": { + "name": "roles", + "namespaced": true, + "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", + "group": "rbac.authorization.k8s.io", + "version": "v1alpha1", + "kind": "Role", + "proto": "api.rbac.v1alpha1.Role", + "rust": "api::rbac::v1alpha1::Role", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1alpha1/roles", + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles", + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}" + ], + "subresources": [] + }, + "api.rbac.v1alpha1.RoleBinding": { + "name": "rolebindings", + "namespaced": true, + "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", + "group": "rbac.authorization.k8s.io", + "version": "v1alpha1", + "kind": "RoleBinding", + "proto": "api.rbac.v1alpha1.RoleBinding", + "rust": "api::rbac::v1alpha1::RoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings", + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings", + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}" + ], + "subresources": [] + }, + "api.scheduling.v1.PriorityClass": { + "name": "priorityclasses", + "namespaced": false, + "apiGroupVersion": "scheduling.k8s.io/v1", + "group": "scheduling.k8s.io", + "version": "v1", + "kind": "PriorityClass", + "proto": "api.scheduling.v1.PriorityClass", + "rust": "api::scheduling::v1::PriorityClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/scheduling.k8s.io/v1/priorityclasses", + "/apis/scheduling.k8s.io/v1/priorityclasses/{name}" + ], + "subresources": [] + }, + "api.scheduling.v1alpha1.PriorityClass": { + "name": "priorityclasses", + "namespaced": false, + "apiGroupVersion": "scheduling.k8s.io/v1alpha1", + "group": "scheduling.k8s.io", + "version": "v1alpha1", + "kind": "PriorityClass", + "proto": "api.scheduling.v1alpha1.PriorityClass", + "rust": "api::scheduling::v1alpha1::PriorityClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", + "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" + ], + "subresources": [] + }, + "api.storage.v1.CSIDriver": { + "name": "csidrivers", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", + "version": "v1", + "kind": "CSIDriver", + "proto": "api.storage.v1.CSIDriver", + "rust": "api::storage::v1::CSIDriver", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1::CSIDriverSpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/csidrivers", + "/apis/storage.k8s.io/v1/csidrivers/{name}" + ], + "subresources": [] + }, + "api.storage.v1.CSINode": { + "name": "csinodes", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", + "version": "v1", + "kind": "CSINode", + "proto": "api.storage.v1.CSINode", + "rust": "api::storage::v1::CSINode", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1::CSINodeSpec", + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/csinodes", + "/apis/storage.k8s.io/v1/csinodes/{name}" + ], + "subresources": [] + }, + "api.storage.v1.StorageClass": { + "name": "storageclasses", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", + "version": "v1", + "kind": "StorageClass", + "proto": "api.storage.v1.StorageClass", + "rust": "api::storage::v1::StorageClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/storageclasses", + "/apis/storage.k8s.io/v1/storageclasses/{name}" + ], + "subresources": [] + }, + "api.storage.v1.VolumeAttachment": { + "name": "volumeattachments", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", + "version": "v1", + "kind": "VolumeAttachment", + "proto": "api.storage.v1.VolumeAttachment", + "rust": "api::storage::v1::VolumeAttachment", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1::VolumeAttachmentSpec", + "status": "api::storage::v1::VolumeAttachmentStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/volumeattachments", + "/apis/storage.k8s.io/v1/volumeattachments/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/volumeattachments/{name}/status" + ] + } + ] + }, + "api.storage.v1alpha1.CSIStorageCapacity": { + "name": "csistoragecapacities", + "namespaced": true, + "apiGroupVersion": "storage.k8s.io/v1alpha1", + "group": "storage.k8s.io", + "version": "v1alpha1", + "kind": "CSIStorageCapacity", + "proto": "api.storage.v1alpha1.CSIStorageCapacity", + "rust": "api::storage::v1alpha1::CSIStorageCapacity", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1alpha1/csistoragecapacities", + "/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities", + "/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}" + ], + "subresources": [] + }, + "api.storage.v1alpha1.VolumeAttachment": { + "name": "volumeattachments", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1alpha1", + "group": "storage.k8s.io", + "version": "v1alpha1", + "kind": "VolumeAttachment", + "proto": "api.storage.v1alpha1.VolumeAttachment", + "rust": "api::storage::v1alpha1::VolumeAttachment", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "api::storage::v1alpha1::VolumeAttachmentSpec", + "status": "api::storage::v1alpha1::VolumeAttachmentStatus", + "condition": null, + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1alpha1/volumeattachments", + "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" + ], + "subresources": [] + }, + "api.storage.v1beta1.CSIStorageCapacity": { + "name": "csistoragecapacities", + "namespaced": true, + "apiGroupVersion": "storage.k8s.io/v1beta1", + "group": "storage.k8s.io", + "version": "v1beta1", + "kind": "CSIStorageCapacity", + "proto": "api.storage.v1beta1.CSIStorageCapacity", + "rust": "api::storage::v1beta1::CSIStorageCapacity", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": null, + "status": null, + "condition": null, + "scopedVerbs": { + "all": [ + "list" + ], + "namespaced": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1beta1/csistoragecapacities", + "/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities", + "/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}" + ], + "subresources": [] + }, + "apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition": { + "name": "customresourcedefinitions", + "namespaced": false, + "apiGroupVersion": "apiextensions.k8s.io/v1", + "group": "apiextensions.k8s.io", + "version": "v1", + "kind": "CustomResourceDefinition", + "proto": "apiextensions_apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition", + "rust": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinitionSpec", + "status": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinitionStatus", + "condition": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinitionCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiextensions.k8s.io/v1/customresourcedefinitions", + "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status" + ] + } + ] + }, + "kube_aggregator.pkg.apis.apiregistration.v1.APIService": { + "name": "apiservices", + "namespaced": false, + "apiGroupVersion": "apiregistration.k8s.io/v1", + "group": "apiregistration.k8s.io", + "version": "v1", + "kind": "APIService", + "proto": "kube_aggregator.pkg.apis.apiregistration.v1.APIService", + "rust": "kube_aggregator::pkg::apis::apiregistration::v1::APIService", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", + "spec": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceSpec", + "status": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceStatus", + "condition": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceCondition", + "scopedVerbs": { + "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiregistration.k8s.io/v1/apiservices", + "/apis/apiregistration.k8s.io/v1/apiservices/{name}" + ], + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status" + ] + } + ] + } +} diff --git a/out/api.admission.v1.rs b/k8s-pb-codegen/out/api.admission.v1.rs similarity index 100% rename from out/api.admission.v1.rs rename to k8s-pb-codegen/out/api.admission.v1.rs diff --git a/out/api.admission.v1beta1.rs b/k8s-pb-codegen/out/api.admission.v1beta1.rs similarity index 100% rename from out/api.admission.v1beta1.rs rename to k8s-pb-codegen/out/api.admission.v1beta1.rs diff --git a/out/api.admissionregistration.v1.rs b/k8s-pb-codegen/out/api.admissionregistration.v1.rs similarity index 100% rename from out/api.admissionregistration.v1.rs rename to k8s-pb-codegen/out/api.admissionregistration.v1.rs diff --git a/out/api.admissionregistration.v1beta1.rs b/k8s-pb-codegen/out/api.admissionregistration.v1beta1.rs similarity index 100% rename from out/api.admissionregistration.v1beta1.rs rename to k8s-pb-codegen/out/api.admissionregistration.v1beta1.rs diff --git a/out/api.apiserverinternal.v1alpha1.rs b/k8s-pb-codegen/out/api.apiserverinternal.v1alpha1.rs similarity index 100% rename from out/api.apiserverinternal.v1alpha1.rs rename to k8s-pb-codegen/out/api.apiserverinternal.v1alpha1.rs diff --git a/out/api.apps.v1.rs b/k8s-pb-codegen/out/api.apps.v1.rs similarity index 99% rename from out/api.apps.v1.rs rename to k8s-pb-codegen/out/api.apps.v1.rs index 0859778..d0e7388 100644 --- a/out/api.apps.v1.rs +++ b/k8s-pb-codegen/out/api.apps.v1.rs @@ -737,3 +737,8 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } +// TODO generics for controllerrevisions apps/v1 +// TODO generics for daemonsets apps/v1 +// TODO generics for deployments apps/v1 +// TODO generics for replicasets apps/v1 +// TODO generics for statefulsets apps/v1 \ No newline at end of file diff --git a/out/api.apps.v1beta1.rs b/k8s-pb-codegen/out/api.apps.v1beta1.rs similarity index 100% rename from out/api.apps.v1beta1.rs rename to k8s-pb-codegen/out/api.apps.v1beta1.rs diff --git a/out/api.apps.v1beta2.rs b/k8s-pb-codegen/out/api.apps.v1beta2.rs similarity index 100% rename from out/api.apps.v1beta2.rs rename to k8s-pb-codegen/out/api.apps.v1beta2.rs diff --git a/out/api.authentication.v1.rs b/k8s-pb-codegen/out/api.authentication.v1.rs similarity index 100% rename from out/api.authentication.v1.rs rename to k8s-pb-codegen/out/api.authentication.v1.rs diff --git a/out/api.authentication.v1beta1.rs b/k8s-pb-codegen/out/api.authentication.v1beta1.rs similarity index 100% rename from out/api.authentication.v1beta1.rs rename to k8s-pb-codegen/out/api.authentication.v1beta1.rs diff --git a/out/api.authorization.v1.rs b/k8s-pb-codegen/out/api.authorization.v1.rs similarity index 100% rename from out/api.authorization.v1.rs rename to k8s-pb-codegen/out/api.authorization.v1.rs diff --git a/out/api.authorization.v1beta1.rs b/k8s-pb-codegen/out/api.authorization.v1beta1.rs similarity index 100% rename from out/api.authorization.v1beta1.rs rename to k8s-pb-codegen/out/api.authorization.v1beta1.rs diff --git a/out/api.autoscaling.v1.rs b/k8s-pb-codegen/out/api.autoscaling.v1.rs similarity index 99% rename from out/api.autoscaling.v1.rs rename to k8s-pb-codegen/out/api.autoscaling.v1.rs index f6d3832..56273f6 100644 --- a/out/api.autoscaling.v1.rs +++ b/k8s-pb-codegen/out/api.autoscaling.v1.rs @@ -482,3 +482,4 @@ pub struct ScaleStatus { #[prost(string, optional, tag="2")] pub selector: ::core::option::Option<::prost::alloc::string::String>, } +// TODO generics for horizontalpodautoscalers autoscaling/v1 \ No newline at end of file diff --git a/out/api.autoscaling.v2beta1.rs b/k8s-pb-codegen/out/api.autoscaling.v2beta1.rs similarity index 99% rename from out/api.autoscaling.v2beta1.rs rename to k8s-pb-codegen/out/api.autoscaling.v2beta1.rs index c0381c0..5be4516 100644 --- a/out/api.autoscaling.v2beta1.rs +++ b/k8s-pb-codegen/out/api.autoscaling.v2beta1.rs @@ -459,3 +459,4 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="3")] pub current_average_value: ::core::option::Option, } +// TODO generics for horizontalpodautoscalers autoscaling/v2beta1 \ No newline at end of file diff --git a/out/api.autoscaling.v2beta2.rs b/k8s-pb-codegen/out/api.autoscaling.v2beta2.rs similarity index 99% rename from out/api.autoscaling.v2beta2.rs rename to k8s-pb-codegen/out/api.autoscaling.v2beta2.rs index 73fa247..4bc0e69 100644 --- a/out/api.autoscaling.v2beta2.rs +++ b/k8s-pb-codegen/out/api.autoscaling.v2beta2.rs @@ -483,3 +483,4 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="2")] pub current: ::core::option::Option, } +// TODO generics for horizontalpodautoscalers autoscaling/v2beta2 \ No newline at end of file diff --git a/out/api.batch.v1.rs b/k8s-pb-codegen/out/api.batch.v1.rs similarity index 99% rename from out/api.batch.v1.rs rename to k8s-pb-codegen/out/api.batch.v1.rs index 63bdf03..28a3a62 100644 --- a/out/api.batch.v1.rs +++ b/k8s-pb-codegen/out/api.batch.v1.rs @@ -348,3 +348,5 @@ pub struct UncountedTerminatedPods { #[prost(string, repeated, tag="2")] pub failed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +// TODO generics for cronjobs batch/v1 +// TODO generics for jobs batch/v1 \ No newline at end of file diff --git a/out/api.batch.v1beta1.rs b/k8s-pb-codegen/out/api.batch.v1beta1.rs similarity index 99% rename from out/api.batch.v1beta1.rs rename to k8s-pb-codegen/out/api.batch.v1beta1.rs index 4bfa095..55901bc 100644 --- a/out/api.batch.v1beta1.rs +++ b/k8s-pb-codegen/out/api.batch.v1beta1.rs @@ -114,3 +114,4 @@ pub struct JobTemplateSpec { #[prost(message, optional, tag="2")] pub spec: ::core::option::Option, } +// TODO generics for cronjobs batch/v1beta1 \ No newline at end of file diff --git a/out/api.certificates.v1.rs b/k8s-pb-codegen/out/api.certificates.v1.rs similarity index 100% rename from out/api.certificates.v1.rs rename to k8s-pb-codegen/out/api.certificates.v1.rs diff --git a/out/api.certificates.v1beta1.rs b/k8s-pb-codegen/out/api.certificates.v1beta1.rs similarity index 100% rename from out/api.certificates.v1beta1.rs rename to k8s-pb-codegen/out/api.certificates.v1beta1.rs diff --git a/out/api.coordination.v1.rs b/k8s-pb-codegen/out/api.coordination.v1.rs similarity index 100% rename from out/api.coordination.v1.rs rename to k8s-pb-codegen/out/api.coordination.v1.rs diff --git a/out/api.coordination.v1beta1.rs b/k8s-pb-codegen/out/api.coordination.v1beta1.rs similarity index 100% rename from out/api.coordination.v1beta1.rs rename to k8s-pb-codegen/out/api.coordination.v1beta1.rs diff --git a/out/api.core.v1.rs b/k8s-pb-codegen/out/api.core.v1.rs similarity index 100% rename from out/api.core.v1.rs rename to k8s-pb-codegen/out/api.core.v1.rs diff --git a/out/api.discovery.v1.rs b/k8s-pb-codegen/out/api.discovery.v1.rs similarity index 100% rename from out/api.discovery.v1.rs rename to k8s-pb-codegen/out/api.discovery.v1.rs diff --git a/out/api.discovery.v1beta1.rs b/k8s-pb-codegen/out/api.discovery.v1beta1.rs similarity index 100% rename from out/api.discovery.v1beta1.rs rename to k8s-pb-codegen/out/api.discovery.v1beta1.rs diff --git a/out/api.events.v1.rs b/k8s-pb-codegen/out/api.events.v1.rs similarity index 100% rename from out/api.events.v1.rs rename to k8s-pb-codegen/out/api.events.v1.rs diff --git a/out/api.events.v1beta1.rs b/k8s-pb-codegen/out/api.events.v1beta1.rs similarity index 100% rename from out/api.events.v1beta1.rs rename to k8s-pb-codegen/out/api.events.v1beta1.rs diff --git a/out/api.extensions.v1beta1.rs b/k8s-pb-codegen/out/api.extensions.v1beta1.rs similarity index 100% rename from out/api.extensions.v1beta1.rs rename to k8s-pb-codegen/out/api.extensions.v1beta1.rs diff --git a/out/api.flowcontrol.v1alpha1.rs b/k8s-pb-codegen/out/api.flowcontrol.v1alpha1.rs similarity index 100% rename from out/api.flowcontrol.v1alpha1.rs rename to k8s-pb-codegen/out/api.flowcontrol.v1alpha1.rs diff --git a/out/api.flowcontrol.v1beta1.rs b/k8s-pb-codegen/out/api.flowcontrol.v1beta1.rs similarity index 100% rename from out/api.flowcontrol.v1beta1.rs rename to k8s-pb-codegen/out/api.flowcontrol.v1beta1.rs diff --git a/out/api.imagepolicy.v1alpha1.rs b/k8s-pb-codegen/out/api.imagepolicy.v1alpha1.rs similarity index 100% rename from out/api.imagepolicy.v1alpha1.rs rename to k8s-pb-codegen/out/api.imagepolicy.v1alpha1.rs diff --git a/out/api.networking.v1.rs b/k8s-pb-codegen/out/api.networking.v1.rs similarity index 100% rename from out/api.networking.v1.rs rename to k8s-pb-codegen/out/api.networking.v1.rs diff --git a/out/api.networking.v1beta1.rs b/k8s-pb-codegen/out/api.networking.v1beta1.rs similarity index 100% rename from out/api.networking.v1beta1.rs rename to k8s-pb-codegen/out/api.networking.v1beta1.rs diff --git a/out/api.node.v1.rs b/k8s-pb-codegen/out/api.node.v1.rs similarity index 100% rename from out/api.node.v1.rs rename to k8s-pb-codegen/out/api.node.v1.rs diff --git a/out/api.node.v1alpha1.rs b/k8s-pb-codegen/out/api.node.v1alpha1.rs similarity index 100% rename from out/api.node.v1alpha1.rs rename to k8s-pb-codegen/out/api.node.v1alpha1.rs diff --git a/out/api.node.v1beta1.rs b/k8s-pb-codegen/out/api.node.v1beta1.rs similarity index 100% rename from out/api.node.v1beta1.rs rename to k8s-pb-codegen/out/api.node.v1beta1.rs diff --git a/out/api.policy.v1.rs b/k8s-pb-codegen/out/api.policy.v1.rs similarity index 99% rename from out/api.policy.v1.rs rename to k8s-pb-codegen/out/api.policy.v1.rs index e091228..f689e80 100644 --- a/out/api.policy.v1.rs +++ b/k8s-pb-codegen/out/api.policy.v1.rs @@ -123,3 +123,4 @@ pub struct PodDisruptionBudgetStatus { #[prost(message, repeated, tag="7")] pub conditions: ::prost::alloc::vec::Vec, } +// TODO generics for poddisruptionbudgets policy/v1 \ No newline at end of file diff --git a/out/api.policy.v1beta1.rs b/k8s-pb-codegen/out/api.policy.v1beta1.rs similarity index 99% rename from out/api.policy.v1beta1.rs rename to k8s-pb-codegen/out/api.policy.v1beta1.rs index 3e5927f..d5957bd 100644 --- a/out/api.policy.v1beta1.rs +++ b/k8s-pb-codegen/out/api.policy.v1beta1.rs @@ -415,3 +415,5 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } +// TODO generics for poddisruptionbudgets policy/v1beta1 +// TODO generics for podsecuritypolicies policy/v1beta1 \ No newline at end of file diff --git a/out/api.rbac.v1.rs b/k8s-pb-codegen/out/api.rbac.v1.rs similarity index 100% rename from out/api.rbac.v1.rs rename to k8s-pb-codegen/out/api.rbac.v1.rs diff --git a/out/api.rbac.v1alpha1.rs b/k8s-pb-codegen/out/api.rbac.v1alpha1.rs similarity index 100% rename from out/api.rbac.v1alpha1.rs rename to k8s-pb-codegen/out/api.rbac.v1alpha1.rs diff --git a/out/api.rbac.v1beta1.rs b/k8s-pb-codegen/out/api.rbac.v1beta1.rs similarity index 100% rename from out/api.rbac.v1beta1.rs rename to k8s-pb-codegen/out/api.rbac.v1beta1.rs diff --git a/out/api.scheduling.v1.rs b/k8s-pb-codegen/out/api.scheduling.v1.rs similarity index 100% rename from out/api.scheduling.v1.rs rename to k8s-pb-codegen/out/api.scheduling.v1.rs diff --git a/out/api.scheduling.v1alpha1.rs b/k8s-pb-codegen/out/api.scheduling.v1alpha1.rs similarity index 100% rename from out/api.scheduling.v1alpha1.rs rename to k8s-pb-codegen/out/api.scheduling.v1alpha1.rs diff --git a/out/api.scheduling.v1beta1.rs b/k8s-pb-codegen/out/api.scheduling.v1beta1.rs similarity index 100% rename from out/api.scheduling.v1beta1.rs rename to k8s-pb-codegen/out/api.scheduling.v1beta1.rs diff --git a/out/api.storage.v1.rs b/k8s-pb-codegen/out/api.storage.v1.rs similarity index 100% rename from out/api.storage.v1.rs rename to k8s-pb-codegen/out/api.storage.v1.rs diff --git a/out/api.storage.v1alpha1.rs b/k8s-pb-codegen/out/api.storage.v1alpha1.rs similarity index 100% rename from out/api.storage.v1alpha1.rs rename to k8s-pb-codegen/out/api.storage.v1alpha1.rs diff --git a/out/api.storage.v1beta1.rs b/k8s-pb-codegen/out/api.storage.v1beta1.rs similarity index 100% rename from out/api.storage.v1beta1.rs rename to k8s-pb-codegen/out/api.storage.v1beta1.rs diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs b/k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs similarity index 100% rename from out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs rename to k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs b/k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs similarity index 100% rename from out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs rename to k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs diff --git a/out/apimachinery.pkg.api.resource.rs b/k8s-pb-codegen/out/apimachinery.pkg.api.resource.rs similarity index 100% rename from out/apimachinery.pkg.api.resource.rs rename to k8s-pb-codegen/out/apimachinery.pkg.api.resource.rs diff --git a/out/apimachinery.pkg.apis.meta.v1.rs b/k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1.rs similarity index 100% rename from out/apimachinery.pkg.apis.meta.v1.rs rename to k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1.rs diff --git a/out/apimachinery.pkg.apis.meta.v1beta1.rs b/k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1beta1.rs similarity index 100% rename from out/apimachinery.pkg.apis.meta.v1beta1.rs rename to k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1beta1.rs diff --git a/out/apimachinery.pkg.apis.testapigroup.v1.rs b/k8s-pb-codegen/out/apimachinery.pkg.apis.testapigroup.v1.rs similarity index 100% rename from out/apimachinery.pkg.apis.testapigroup.v1.rs rename to k8s-pb-codegen/out/apimachinery.pkg.apis.testapigroup.v1.rs diff --git a/out/apimachinery.pkg.runtime.rs b/k8s-pb-codegen/out/apimachinery.pkg.runtime.rs similarity index 100% rename from out/apimachinery.pkg.runtime.rs rename to k8s-pb-codegen/out/apimachinery.pkg.runtime.rs diff --git a/out/apimachinery.pkg.runtime.schema.rs b/k8s-pb-codegen/out/apimachinery.pkg.runtime.schema.rs similarity index 100% rename from out/apimachinery.pkg.runtime.schema.rs rename to k8s-pb-codegen/out/apimachinery.pkg.runtime.schema.rs diff --git a/out/apimachinery.pkg.util.intstr.rs b/k8s-pb-codegen/out/apimachinery.pkg.util.intstr.rs similarity index 100% rename from out/apimachinery.pkg.util.intstr.rs rename to k8s-pb-codegen/out/apimachinery.pkg.util.intstr.rs diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1.rs b/k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1.rs similarity index 100% rename from out/kube_aggregator.pkg.apis.apiregistration.v1.rs rename to k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1.rs diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs b/k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs similarity index 100% rename from out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs rename to k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta1.rs similarity index 100% rename from out/metrics.pkg.apis.custom_metrics.v1beta1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta1.rs diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta2.rs b/k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta2.rs similarity index 100% rename from out/metrics.pkg.apis.custom_metrics.v1beta2.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta2.rs diff --git a/out/metrics.pkg.apis.external_metrics.v1beta1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.external_metrics.v1beta1.rs similarity index 100% rename from out/metrics.pkg.apis.external_metrics.v1beta1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.external_metrics.v1beta1.rs diff --git a/out/metrics.pkg.apis.metrics.v1alpha1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1alpha1.rs similarity index 100% rename from out/metrics.pkg.apis.metrics.v1alpha1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1alpha1.rs diff --git a/out/metrics.pkg.apis.metrics.v1beta1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1beta1.rs similarity index 100% rename from out/metrics.pkg.apis.metrics.v1beta1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1beta1.rs diff --git a/k8s-pb-codegen/pbcodegen.rs b/k8s-pb-codegen/pbcodegen.rs new file mode 100644 index 0000000..97c8ae2 --- /dev/null +++ b/k8s-pb-codegen/pbcodegen.rs @@ -0,0 +1,86 @@ +use prost::Message; +use prost_types::{FileDescriptorProto, FileDescriptorSet}; +#[macro_use] +extern crate log; +use anyhow::{Context, Result}; +use pbcodegen::*; +use std::{ + fs, + io::Write, + path::{Path, PathBuf}, +}; + +fn read_file>(path: P) -> Result { + Ok(fs::read_to_string(&path).with_context(|| format!("read {}", path.as_ref().display()))?) +} + +fn main() -> Result<()> { + std::env::set_var("RUST_LOG", "pbcodegen=info"); + env_logger::init(); + let root = Path::new(env!("CARGO_MANIFEST_DIR")); + info!("parsing protos.list in {}", root.display()); + + let proto_file: String = read_file(root.join("protos.list"))?; + let protos = proto_file.lines().collect::>(); + debug!("protos: {:?}", protos); + + info!("building protos"); + prost_build::Config::new() + // should probably switch to this + //.btree_map(&["."]) + .out_dir("./out") + .compile_protos(protos.as_slice(), &["protos/"])?; + + info!("loading api-resources"); + let apif: String = read_file(root.join("openapi/api-resources.json"))?; + let apis: Vec = + serde_json::from_str(&apif).with_context(|| "parse api-resources.json".to_string())?; + + let buf = + std::fs::read(root.join("protos.fds")).with_context(|| "read protos.fds".to_string())?; + let fds = FileDescriptorSet::decode(&*buf).unwrap(); // pulls in proto::Message + + // NB: FDS fields: https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a338e9afd7717d0f42ca9/prost-types/src/protobuf.rs#L1-L7 + // FDS usage: https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a338e9afd7717d0f42ca9/prost-build/src/lib.rs#L765-L825 + for f in fds.file { + if let Some(pkg) = f.package { + let pkgpath = Path::new("./out").join(format!("{}.rs", pkg)); + // match the pkg name to a key in api-resources.json + info!("generating {}", pkg); + if let Some(apikey) = pkgname_to_api_key(&pkg) { + let mut codegen = vec![]; + // find the corresponding apiGroupVersion + if let Some(apigr) = apis.iter().find(|ag| ag.apiGroupVersion == apikey) { + for dp in f.message_type { + if let Some(name) = dp.name { + let children: Vec = + apigr.resources.iter().map(|gr| gr.kind.clone()).collect(); + info!(" - found {:?} in {}", children, apikey); + if name.ends_with("List") { + continue; + } + // find the inner resource with matching kind name + if let Some(api) = apigr.resources.iter().find(|gr| name == gr.kind) { + codegen.push(api.generics()); + } else { + debug!(" - no-generics for {}/{} (not in {})", pkg, name, apikey); + } + } + } + } else { + warn!("skipped: {} (didn't find {})", pkg, apikey); + } + let generics = codegen.join("\n"); + let mut file = fs::OpenOptions::new() + .write(true) + .append(true) + .open(&pkgpath)?; + file.write(generics.as_bytes())?; + } + } + } + + // Generate code in `src/` by reading files in `OUT_DIR`? + // Need to create `mod.rs` file for each level based on the filename, and write generated code in correct file. + Ok(()) +} diff --git a/k8s-pb-codegen/protos.list b/k8s-pb-codegen/protos.list new file mode 100644 index 0000000..e511044 --- /dev/null +++ b/k8s-pb-codegen/protos.list @@ -0,0 +1,62 @@ +protos/api/admissionregistration/v1beta1/generated.proto +protos/api/admissionregistration/v1/generated.proto +protos/api/admission/v1beta1/generated.proto +protos/api/admission/v1/generated.proto +protos/api/apiserverinternal/v1alpha1/generated.proto +protos/api/apps/v1beta1/generated.proto +protos/api/apps/v1beta2/generated.proto +protos/api/apps/v1/generated.proto +protos/api/authentication/v1beta1/generated.proto +protos/api/authentication/v1/generated.proto +protos/api/authorization/v1beta1/generated.proto +protos/api/authorization/v1/generated.proto +protos/api/autoscaling/v1/generated.proto +protos/api/autoscaling/v2beta1/generated.proto +protos/api/autoscaling/v2beta2/generated.proto +protos/api/batch/v1beta1/generated.proto +protos/api/batch/v1/generated.proto +protos/api/certificates/v1beta1/generated.proto +protos/api/certificates/v1/generated.proto +protos/api/coordination/v1beta1/generated.proto +protos/api/coordination/v1/generated.proto +protos/api/core/v1/generated.proto +protos/api/discovery/v1beta1/generated.proto +protos/api/discovery/v1/generated.proto +protos/api/events/v1beta1/generated.proto +protos/api/events/v1/generated.proto +protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +protos/api/extensions/v1beta1/generated.proto +protos/api/flowcontrol/v1alpha1/generated.proto +protos/api/flowcontrol/v1beta1/generated.proto +protos/api/imagepolicy/v1alpha1/generated.proto +protos/apimachinery/pkg/api/resource/generated.proto +protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto +protos/apimachinery/pkg/apis/meta/v1/generated.proto +protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto +protos/apimachinery/pkg/runtime/generated.proto +protos/apimachinery/pkg/runtime/schema/generated.proto +protos/apimachinery/pkg/util/intstr/generated.proto +protos/api/networking/v1beta1/generated.proto +protos/api/networking/v1/generated.proto +protos/api/node/v1alpha1/generated.proto +protos/api/node/v1beta1/generated.proto +protos/api/node/v1/generated.proto +protos/api/policy/v1beta1/generated.proto +protos/api/policy/v1/generated.proto +protos/api/rbac/v1alpha1/generated.proto +protos/api/rbac/v1beta1/generated.proto +protos/api/rbac/v1/generated.proto +protos/api/scheduling/v1alpha1/generated.proto +protos/api/scheduling/v1beta1/generated.proto +protos/api/scheduling/v1/generated.proto +protos/api/storage/v1alpha1/generated.proto +protos/api/storage/v1beta1/generated.proto +protos/api/storage/v1/generated.proto +protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto +protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto +protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto +protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto +protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto +protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto +protos/metrics/pkg/apis/metrics/v1beta1/generated.proto diff --git a/protos/api/admission/v1/generated.proto b/k8s-pb-codegen/protos/api/admission/v1/generated.proto similarity index 100% rename from protos/api/admission/v1/generated.proto rename to k8s-pb-codegen/protos/api/admission/v1/generated.proto diff --git a/protos/api/admission/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/admission/v1beta1/generated.proto similarity index 100% rename from protos/api/admission/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/admission/v1beta1/generated.proto diff --git a/protos/api/admissionregistration/v1/generated.proto b/k8s-pb-codegen/protos/api/admissionregistration/v1/generated.proto similarity index 100% rename from protos/api/admissionregistration/v1/generated.proto rename to k8s-pb-codegen/protos/api/admissionregistration/v1/generated.proto diff --git a/protos/api/admissionregistration/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/admissionregistration/v1beta1/generated.proto similarity index 100% rename from protos/api/admissionregistration/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/admissionregistration/v1beta1/generated.proto diff --git a/protos/api/apiserverinternal/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/apiserverinternal/v1alpha1/generated.proto similarity index 100% rename from protos/api/apiserverinternal/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/apiserverinternal/v1alpha1/generated.proto diff --git a/protos/api/apps/v1/generated.proto b/k8s-pb-codegen/protos/api/apps/v1/generated.proto similarity index 100% rename from protos/api/apps/v1/generated.proto rename to k8s-pb-codegen/protos/api/apps/v1/generated.proto diff --git a/protos/api/apps/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/apps/v1beta1/generated.proto similarity index 100% rename from protos/api/apps/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/apps/v1beta1/generated.proto diff --git a/protos/api/apps/v1beta2/generated.proto b/k8s-pb-codegen/protos/api/apps/v1beta2/generated.proto similarity index 100% rename from protos/api/apps/v1beta2/generated.proto rename to k8s-pb-codegen/protos/api/apps/v1beta2/generated.proto diff --git a/protos/api/authentication/v1/generated.proto b/k8s-pb-codegen/protos/api/authentication/v1/generated.proto similarity index 100% rename from protos/api/authentication/v1/generated.proto rename to k8s-pb-codegen/protos/api/authentication/v1/generated.proto diff --git a/protos/api/authentication/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/authentication/v1beta1/generated.proto similarity index 100% rename from protos/api/authentication/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/authentication/v1beta1/generated.proto diff --git a/protos/api/authorization/v1/generated.proto b/k8s-pb-codegen/protos/api/authorization/v1/generated.proto similarity index 100% rename from protos/api/authorization/v1/generated.proto rename to k8s-pb-codegen/protos/api/authorization/v1/generated.proto diff --git a/protos/api/authorization/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/authorization/v1beta1/generated.proto similarity index 100% rename from protos/api/authorization/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/authorization/v1beta1/generated.proto diff --git a/protos/api/autoscaling/v1/generated.proto b/k8s-pb-codegen/protos/api/autoscaling/v1/generated.proto similarity index 100% rename from protos/api/autoscaling/v1/generated.proto rename to k8s-pb-codegen/protos/api/autoscaling/v1/generated.proto diff --git a/protos/api/autoscaling/v2beta1/generated.proto b/k8s-pb-codegen/protos/api/autoscaling/v2beta1/generated.proto similarity index 100% rename from protos/api/autoscaling/v2beta1/generated.proto rename to k8s-pb-codegen/protos/api/autoscaling/v2beta1/generated.proto diff --git a/protos/api/autoscaling/v2beta2/generated.proto b/k8s-pb-codegen/protos/api/autoscaling/v2beta2/generated.proto similarity index 100% rename from protos/api/autoscaling/v2beta2/generated.proto rename to k8s-pb-codegen/protos/api/autoscaling/v2beta2/generated.proto diff --git a/protos/api/batch/v1/generated.proto b/k8s-pb-codegen/protos/api/batch/v1/generated.proto similarity index 100% rename from protos/api/batch/v1/generated.proto rename to k8s-pb-codegen/protos/api/batch/v1/generated.proto diff --git a/protos/api/batch/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/batch/v1beta1/generated.proto similarity index 100% rename from protos/api/batch/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/batch/v1beta1/generated.proto diff --git a/protos/api/certificates/v1/generated.proto b/k8s-pb-codegen/protos/api/certificates/v1/generated.proto similarity index 100% rename from protos/api/certificates/v1/generated.proto rename to k8s-pb-codegen/protos/api/certificates/v1/generated.proto diff --git a/protos/api/certificates/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/certificates/v1beta1/generated.proto similarity index 100% rename from protos/api/certificates/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/certificates/v1beta1/generated.proto diff --git a/protos/api/coordination/v1/generated.proto b/k8s-pb-codegen/protos/api/coordination/v1/generated.proto similarity index 100% rename from protos/api/coordination/v1/generated.proto rename to k8s-pb-codegen/protos/api/coordination/v1/generated.proto diff --git a/protos/api/coordination/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/coordination/v1beta1/generated.proto similarity index 100% rename from protos/api/coordination/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/coordination/v1beta1/generated.proto diff --git a/protos/api/core/v1/generated.proto b/k8s-pb-codegen/protos/api/core/v1/generated.proto similarity index 100% rename from protos/api/core/v1/generated.proto rename to k8s-pb-codegen/protos/api/core/v1/generated.proto diff --git a/protos/api/discovery/v1/generated.proto b/k8s-pb-codegen/protos/api/discovery/v1/generated.proto similarity index 100% rename from protos/api/discovery/v1/generated.proto rename to k8s-pb-codegen/protos/api/discovery/v1/generated.proto diff --git a/protos/api/discovery/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/discovery/v1beta1/generated.proto similarity index 100% rename from protos/api/discovery/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/discovery/v1beta1/generated.proto diff --git a/protos/api/events/v1/generated.proto b/k8s-pb-codegen/protos/api/events/v1/generated.proto similarity index 100% rename from protos/api/events/v1/generated.proto rename to k8s-pb-codegen/protos/api/events/v1/generated.proto diff --git a/protos/api/events/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/events/v1beta1/generated.proto similarity index 100% rename from protos/api/events/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/events/v1beta1/generated.proto diff --git a/protos/api/extensions/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/extensions/v1beta1/generated.proto similarity index 100% rename from protos/api/extensions/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/extensions/v1beta1/generated.proto diff --git a/protos/api/flowcontrol/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/flowcontrol/v1alpha1/generated.proto similarity index 100% rename from protos/api/flowcontrol/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/flowcontrol/v1alpha1/generated.proto diff --git a/protos/api/flowcontrol/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/flowcontrol/v1beta1/generated.proto similarity index 100% rename from protos/api/flowcontrol/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/flowcontrol/v1beta1/generated.proto diff --git a/protos/api/imagepolicy/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/imagepolicy/v1alpha1/generated.proto similarity index 100% rename from protos/api/imagepolicy/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/imagepolicy/v1alpha1/generated.proto diff --git a/protos/api/networking/v1/generated.proto b/k8s-pb-codegen/protos/api/networking/v1/generated.proto similarity index 100% rename from protos/api/networking/v1/generated.proto rename to k8s-pb-codegen/protos/api/networking/v1/generated.proto diff --git a/protos/api/networking/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/networking/v1beta1/generated.proto similarity index 100% rename from protos/api/networking/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/networking/v1beta1/generated.proto diff --git a/protos/api/node/v1/generated.proto b/k8s-pb-codegen/protos/api/node/v1/generated.proto similarity index 100% rename from protos/api/node/v1/generated.proto rename to k8s-pb-codegen/protos/api/node/v1/generated.proto diff --git a/protos/api/node/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/node/v1alpha1/generated.proto similarity index 100% rename from protos/api/node/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/node/v1alpha1/generated.proto diff --git a/protos/api/node/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/node/v1beta1/generated.proto similarity index 100% rename from protos/api/node/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/node/v1beta1/generated.proto diff --git a/protos/api/policy/v1/generated.proto b/k8s-pb-codegen/protos/api/policy/v1/generated.proto similarity index 100% rename from protos/api/policy/v1/generated.proto rename to k8s-pb-codegen/protos/api/policy/v1/generated.proto diff --git a/protos/api/policy/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/policy/v1beta1/generated.proto similarity index 100% rename from protos/api/policy/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/policy/v1beta1/generated.proto diff --git a/protos/api/rbac/v1/generated.proto b/k8s-pb-codegen/protos/api/rbac/v1/generated.proto similarity index 100% rename from protos/api/rbac/v1/generated.proto rename to k8s-pb-codegen/protos/api/rbac/v1/generated.proto diff --git a/protos/api/rbac/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/rbac/v1alpha1/generated.proto similarity index 100% rename from protos/api/rbac/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/rbac/v1alpha1/generated.proto diff --git a/protos/api/rbac/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/rbac/v1beta1/generated.proto similarity index 100% rename from protos/api/rbac/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/rbac/v1beta1/generated.proto diff --git a/protos/api/scheduling/v1/generated.proto b/k8s-pb-codegen/protos/api/scheduling/v1/generated.proto similarity index 100% rename from protos/api/scheduling/v1/generated.proto rename to k8s-pb-codegen/protos/api/scheduling/v1/generated.proto diff --git a/protos/api/scheduling/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/scheduling/v1alpha1/generated.proto similarity index 100% rename from protos/api/scheduling/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/scheduling/v1alpha1/generated.proto diff --git a/protos/api/scheduling/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/scheduling/v1beta1/generated.proto similarity index 100% rename from protos/api/scheduling/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/scheduling/v1beta1/generated.proto diff --git a/protos/api/storage/v1/generated.proto b/k8s-pb-codegen/protos/api/storage/v1/generated.proto similarity index 100% rename from protos/api/storage/v1/generated.proto rename to k8s-pb-codegen/protos/api/storage/v1/generated.proto diff --git a/protos/api/storage/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/storage/v1alpha1/generated.proto similarity index 100% rename from protos/api/storage/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/storage/v1alpha1/generated.proto diff --git a/protos/api/storage/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/storage/v1beta1/generated.proto similarity index 100% rename from protos/api/storage/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/storage/v1beta1/generated.proto diff --git a/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto similarity index 100% rename from protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto rename to k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto diff --git a/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto similarity index 100% rename from protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto rename to k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto diff --git a/protos/apimachinery/pkg/api/resource/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/api/resource/generated.proto similarity index 100% rename from protos/apimachinery/pkg/api/resource/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/api/resource/generated.proto diff --git a/protos/apimachinery/pkg/apis/meta/v1/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1/generated.proto similarity index 100% rename from protos/apimachinery/pkg/apis/meta/v1/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1/generated.proto diff --git a/protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto similarity index 100% rename from protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto diff --git a/protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto similarity index 100% rename from protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto diff --git a/protos/apimachinery/pkg/runtime/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/runtime/generated.proto similarity index 100% rename from protos/apimachinery/pkg/runtime/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/runtime/generated.proto diff --git a/protos/apimachinery/pkg/runtime/schema/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/runtime/schema/generated.proto similarity index 100% rename from protos/apimachinery/pkg/runtime/schema/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/runtime/schema/generated.proto diff --git a/protos/apimachinery/pkg/util/intstr/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/util/intstr/generated.proto similarity index 100% rename from protos/apimachinery/pkg/util/intstr/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/util/intstr/generated.proto diff --git a/protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto b/k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto similarity index 100% rename from protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto rename to k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto diff --git a/protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto b/k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto similarity index 100% rename from protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto rename to k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto diff --git a/protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto diff --git a/protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto diff --git a/protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto diff --git a/protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto diff --git a/protos/metrics/pkg/apis/metrics/v1beta1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1beta1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/metrics/v1beta1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1beta1/generated.proto diff --git a/k8s-pb-codegen/src/lib.rs b/k8s-pb-codegen/src/lib.rs new file mode 100644 index 0000000..5fcf16b --- /dev/null +++ b/k8s-pb-codegen/src/lib.rs @@ -0,0 +1,65 @@ +// codify structs in api-resource.json +// this is the root struct (we have a vector of them) +#[derive(serde::Deserialize)] +pub struct GenApiGroupResources { + pub apiGroupVersion: String, + pub resources: Vec, +} +// main resource struct +#[derive(serde::Deserialize)] +pub struct GenApiResource { + /// plural name + pub name: String, + #[serde(default)] + pub namespaced: bool, + pub subresource: bool, + /// apigroup/ver + pub apiGroupVersion: String, + /// apigroup + pub group: String, + /// ver + pub version: String, + pub kind: String, + /// expected module path :: delimited + pub rust: String, + /// allowed verbs + pub verbs: Vec, + pub scopedVerbs: ScopedVerbs, + /// vec of found root paths + /// + /// "/apis/apps/v1/controllerrevisions", + /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", + /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" + pub paths: Vec, +} +#[derive(serde::Deserialize)] +pub struct ScopedVerbs { + #[serde(default)] + pub all: Vec, + #[serde(default)] + pub namespaced: Vec, +} + +impl GenApiResource { + pub fn generics(&self) -> String { + // TODO: use codegen crate here ? + format!("// generics for {} {}", self.name, self.apiGroupVersion) + } +} + +pub fn pkgname_to_api_key(pkg: &str) -> Option { + // TODO: this function is dumb. we probably need to have a better key in the root object than apiGroupVersion + // otherwise we'd have to match up weird paths like api.storage.v1 -> storage.k8s.io/v1 + if let Some((catpth, ver)) = pkg.rsplit_once(".") { + if let Some((category, pth)) = catpth.split_once(".") { + match category { + "api" => Some(format!("{}/{}", pth, ver)), + _ => None, + } + } else { + None + } + } else { + None + } +} diff --git a/k8s-pb/Cargo.toml b/k8s-pb/Cargo.toml new file mode 100644 index 0000000..f1584b2 --- /dev/null +++ b/k8s-pb/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "k8s-pb" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/k8s-pb/src/lib.rs b/k8s-pb/src/lib.rs new file mode 100644 index 0000000..31e1bb2 --- /dev/null +++ b/k8s-pb/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +}