From ca7dfa1e9a7da535953376886b48beda8d6073d4 Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 22 Aug 2021 13:06:50 +0100 Subject: [PATCH 1/8] Add `k8s-pb-codegen` Signed-off-by: clux --- Cargo.toml | 19 ++-- README.md | 95 ++++--------------- build.rs | 74 --------------- justfile | 83 ++++++++++++++++ k8s-pb-codegen/.gitignore | 1 + k8s-pb-codegen/Cargo.toml | 16 ++++ .../openapi}/api-resources.json | 0 .../openapi}/list-paths.jq | 0 .../openapi}/list-resources.jq | 0 .../openapi/patches/patch-nonexistent-gvk.jq | 13 +++ .../openapi}/swagger.json | 0 .../out}/api.admission.v1.rs | 0 .../out}/api.admission.v1beta1.rs | 0 .../out}/api.admissionregistration.v1.rs | 0 .../out}/api.admissionregistration.v1beta1.rs | 0 .../out}/api.apiserverinternal.v1alpha1.rs | 0 {out => k8s-pb-codegen/out}/api.apps.v1.rs | 0 .../out}/api.apps.v1beta1.rs | 0 .../out}/api.apps.v1beta2.rs | 0 .../out}/api.authentication.v1.rs | 0 .../out}/api.authentication.v1beta1.rs | 0 .../out}/api.authorization.v1.rs | 0 .../out}/api.authorization.v1beta1.rs | 0 .../out}/api.autoscaling.v1.rs | 0 .../out}/api.autoscaling.v2beta1.rs | 0 .../out}/api.autoscaling.v2beta2.rs | 0 {out => k8s-pb-codegen/out}/api.batch.v1.rs | 0 .../out}/api.batch.v1beta1.rs | 0 .../out}/api.certificates.v1.rs | 0 .../out}/api.certificates.v1beta1.rs | 0 .../out}/api.coordination.v1.rs | 0 .../out}/api.coordination.v1beta1.rs | 0 {out => k8s-pb-codegen/out}/api.core.v1.rs | 0 .../out}/api.discovery.v1.rs | 0 .../out}/api.discovery.v1beta1.rs | 0 {out => k8s-pb-codegen/out}/api.events.v1.rs | 0 .../out}/api.events.v1beta1.rs | 0 .../out}/api.extensions.v1beta1.rs | 0 .../out}/api.flowcontrol.v1alpha1.rs | 0 .../out}/api.flowcontrol.v1beta1.rs | 0 .../out}/api.imagepolicy.v1alpha1.rs | 0 .../out}/api.networking.v1.rs | 0 .../out}/api.networking.v1beta1.rs | 0 {out => k8s-pb-codegen/out}/api.node.v1.rs | 0 .../out}/api.node.v1alpha1.rs | 0 .../out}/api.node.v1beta1.rs | 0 {out => k8s-pb-codegen/out}/api.policy.v1.rs | 0 .../out}/api.policy.v1beta1.rs | 0 {out => k8s-pb-codegen/out}/api.rbac.v1.rs | 0 .../out}/api.rbac.v1alpha1.rs | 0 .../out}/api.rbac.v1beta1.rs | 0 .../out}/api.scheduling.v1.rs | 0 .../out}/api.scheduling.v1alpha1.rs | 0 .../out}/api.scheduling.v1beta1.rs | 0 {out => k8s-pb-codegen/out}/api.storage.v1.rs | 0 .../out}/api.storage.v1alpha1.rs | 0 .../out}/api.storage.v1beta1.rs | 0 ...ons_apiserver.pkg.apis.apiextensions.v1.rs | 0 ...piserver.pkg.apis.apiextensions.v1beta1.rs | 0 .../out}/apimachinery.pkg.api.resource.rs | 0 .../out}/apimachinery.pkg.apis.meta.v1.rs | 0 .../apimachinery.pkg.apis.meta.v1beta1.rs | 0 .../apimachinery.pkg.apis.testapigroup.v1.rs | 0 .../out}/apimachinery.pkg.runtime.rs | 0 .../out}/apimachinery.pkg.runtime.schema.rs | 0 .../out}/apimachinery.pkg.util.intstr.rs | 0 ..._aggregator.pkg.apis.apiregistration.v1.rs | 0 ...egator.pkg.apis.apiregistration.v1beta1.rs | 0 ...metrics.pkg.apis.custom_metrics.v1beta1.rs | 0 ...metrics.pkg.apis.custom_metrics.v1beta2.rs | 0 ...trics.pkg.apis.external_metrics.v1beta1.rs | 0 .../out}/metrics.pkg.apis.metrics.v1alpha1.rs | 0 .../out}/metrics.pkg.apis.metrics.v1beta1.rs | 0 k8s-pb-codegen/protos.list | 62 ++++++++++++ .../protos}/api/admission/v1/generated.proto | 0 .../api/admission/v1beta1/generated.proto | 0 .../admissionregistration/v1/generated.proto | 0 .../v1beta1/generated.proto | 0 .../v1alpha1/generated.proto | 0 .../protos}/api/apps/v1/generated.proto | 0 .../protos}/api/apps/v1beta1/generated.proto | 0 .../protos}/api/apps/v1beta2/generated.proto | 0 .../api/authentication/v1/generated.proto | 0 .../authentication/v1beta1/generated.proto | 0 .../api/authorization/v1/generated.proto | 0 .../api/authorization/v1beta1/generated.proto | 0 .../api/autoscaling/v1/generated.proto | 0 .../api/autoscaling/v2beta1/generated.proto | 0 .../api/autoscaling/v2beta2/generated.proto | 0 .../protos}/api/batch/v1/generated.proto | 0 .../protos}/api/batch/v1beta1/generated.proto | 0 .../api/certificates/v1/generated.proto | 0 .../api/certificates/v1beta1/generated.proto | 0 .../api/coordination/v1/generated.proto | 0 .../api/coordination/v1beta1/generated.proto | 0 .../protos}/api/core/v1/generated.proto | 0 .../protos}/api/discovery/v1/generated.proto | 0 .../api/discovery/v1beta1/generated.proto | 0 .../protos}/api/events/v1/generated.proto | 0 .../api/events/v1beta1/generated.proto | 0 .../api/extensions/v1beta1/generated.proto | 0 .../api/flowcontrol/v1alpha1/generated.proto | 0 .../api/flowcontrol/v1beta1/generated.proto | 0 .../api/imagepolicy/v1alpha1/generated.proto | 0 .../protos}/api/networking/v1/generated.proto | 0 .../api/networking/v1beta1/generated.proto | 0 .../protos}/api/node/v1/generated.proto | 0 .../protos}/api/node/v1alpha1/generated.proto | 0 .../protos}/api/node/v1beta1/generated.proto | 0 .../protos}/api/policy/v1/generated.proto | 0 .../api/policy/v1beta1/generated.proto | 0 .../protos}/api/rbac/v1/generated.proto | 0 .../protos}/api/rbac/v1alpha1/generated.proto | 0 .../protos}/api/rbac/v1beta1/generated.proto | 0 .../protos}/api/scheduling/v1/generated.proto | 0 .../api/scheduling/v1alpha1/generated.proto | 0 .../api/scheduling/v1beta1/generated.proto | 0 .../protos}/api/storage/v1/generated.proto | 0 .../api/storage/v1alpha1/generated.proto | 0 .../api/storage/v1beta1/generated.proto | 0 .../pkg/apis/apiextensions/v1/generated.proto | 0 .../apiextensions/v1beta1/generated.proto | 0 .../pkg/api/resource/generated.proto | 0 .../pkg/apis/meta/v1/generated.proto | 0 .../pkg/apis/meta/v1beta1/generated.proto | 0 .../pkg/apis/testapigroup/v1/generated.proto | 0 .../apimachinery/pkg/runtime/generated.proto | 0 .../pkg/runtime/schema/generated.proto | 0 .../pkg/util/intstr/generated.proto | 0 .../apis/apiregistration/v1/generated.proto | 0 .../apiregistration/v1beta1/generated.proto | 0 .../custom_metrics/v1beta1/generated.proto | 0 .../custom_metrics/v1beta2/generated.proto | 0 .../external_metrics/v1beta1/generated.proto | 0 .../pkg/apis/metrics/v1alpha1/generated.proto | 0 .../pkg/apis/metrics/v1beta1/generated.proto | 0 k8s-pb-codegen/src/lib.rs | 0 k8s-pb-codegen/src/main.rs | 44 +++++++++ k8s-pb/Cargo.toml | 8 ++ k8s-pb/src/lib.rs | 48 ++++++++++ src/lib.rs | 48 ---------- 141 files changed, 298 insertions(+), 213 deletions(-) delete mode 100644 build.rs create mode 100644 justfile create mode 100644 k8s-pb-codegen/.gitignore create mode 100644 k8s-pb-codegen/Cargo.toml rename {openapi => k8s-pb-codegen/openapi}/api-resources.json (100%) rename {openapi => k8s-pb-codegen/openapi}/list-paths.jq (100%) rename {openapi => k8s-pb-codegen/openapi}/list-resources.jq (100%) create mode 100644 k8s-pb-codegen/openapi/patches/patch-nonexistent-gvk.jq rename {openapi => k8s-pb-codegen/openapi}/swagger.json (100%) rename {out => k8s-pb-codegen/out}/api.admission.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.admission.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.admissionregistration.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.admissionregistration.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.apiserverinternal.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.apps.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.apps.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.apps.v1beta2.rs (100%) rename {out => k8s-pb-codegen/out}/api.authentication.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.authentication.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.authorization.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.authorization.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.autoscaling.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.autoscaling.v2beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.autoscaling.v2beta2.rs (100%) rename {out => k8s-pb-codegen/out}/api.batch.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.batch.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.certificates.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.certificates.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.coordination.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.coordination.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.core.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.discovery.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.discovery.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.events.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.events.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.extensions.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.flowcontrol.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.flowcontrol.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.imagepolicy.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.networking.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.networking.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.node.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.node.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.node.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.policy.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.policy.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.rbac.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.rbac.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.rbac.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.scheduling.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.scheduling.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.scheduling.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/api.storage.v1.rs (100%) rename {out => k8s-pb-codegen/out}/api.storage.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/api.storage.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs (100%) rename {out => k8s-pb-codegen/out}/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.api.resource.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.apis.meta.v1.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.apis.meta.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.apis.testapigroup.v1.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.runtime.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.runtime.schema.rs (100%) rename {out => k8s-pb-codegen/out}/apimachinery.pkg.util.intstr.rs (100%) rename {out => k8s-pb-codegen/out}/kube_aggregator.pkg.apis.apiregistration.v1.rs (100%) rename {out => k8s-pb-codegen/out}/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/metrics.pkg.apis.custom_metrics.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/metrics.pkg.apis.custom_metrics.v1beta2.rs (100%) rename {out => k8s-pb-codegen/out}/metrics.pkg.apis.external_metrics.v1beta1.rs (100%) rename {out => k8s-pb-codegen/out}/metrics.pkg.apis.metrics.v1alpha1.rs (100%) rename {out => k8s-pb-codegen/out}/metrics.pkg.apis.metrics.v1beta1.rs (100%) create mode 100644 k8s-pb-codegen/protos.list rename {protos => k8s-pb-codegen/protos}/api/admission/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/admission/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/admissionregistration/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/admissionregistration/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/apiserverinternal/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/apps/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/apps/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/apps/v1beta2/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/authentication/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/authentication/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/authorization/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/authorization/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/autoscaling/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/autoscaling/v2beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/autoscaling/v2beta2/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/batch/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/batch/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/certificates/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/certificates/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/coordination/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/coordination/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/core/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/discovery/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/discovery/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/events/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/events/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/extensions/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/flowcontrol/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/flowcontrol/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/imagepolicy/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/networking/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/networking/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/node/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/node/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/node/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/policy/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/policy/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/rbac/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/rbac/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/rbac/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/scheduling/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/scheduling/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/scheduling/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/storage/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/storage/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/api/storage/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/api/resource/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/apis/meta/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/apis/meta/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/apis/testapigroup/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/runtime/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/runtime/schema/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/apimachinery/pkg/util/intstr/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/metrics/pkg/apis/external_metrics/v1beta1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/metrics/pkg/apis/metrics/v1alpha1/generated.proto (100%) rename {protos => k8s-pb-codegen/protos}/metrics/pkg/apis/metrics/v1beta1/generated.proto (100%) create mode 100644 k8s-pb-codegen/src/lib.rs create mode 100644 k8s-pb-codegen/src/main.rs create mode 100644 k8s-pb/Cargo.toml create mode 100644 k8s-pb/src/lib.rs delete mode 100644 src/lib.rs 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..6346537 --- /dev/null +++ b/justfile @@ -0,0 +1,83 @@ +VERSION := "1.22.0" + +default: + @just --list + +# Download protos schemas from upstream +protos-dl: + #!/usr/bin/env bash + set -exuo pipefail + cd k8s-pb-codegen + 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 + cd k8s-pb-codegen + 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: + #!/usr/bin/env bash + set -exuo pipefail + cd k8s-pb-codegen + 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 + cd k8s-pb-codegen + rm -rf out/ && mkdir out + cargo run diff --git a/k8s-pb-codegen/.gitignore b/k8s-pb-codegen/.gitignore new file mode 100644 index 0000000..b9ff117 --- /dev/null +++ b/k8s-pb-codegen/.gitignore @@ -0,0 +1 @@ +protos.fds diff --git a/k8s-pb-codegen/Cargo.toml b/k8s-pb-codegen/Cargo.toml new file mode 100644 index 0000000..e67724a --- /dev/null +++ b/k8s-pb-codegen/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "k8s-pb-codegen" +version = "0.1.0" +edition = "2018" +license = "Apache-2.0" + +[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 100% rename from openapi/api-resources.json rename to k8s-pb-codegen/openapi/api-resources.json 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 100% rename from openapi/list-resources.jq rename to k8s-pb-codegen/openapi/list-resources.jq 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/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 100% rename from out/api.apps.v1.rs rename to k8s-pb-codegen/out/api.apps.v1.rs 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 100% rename from out/api.autoscaling.v1.rs rename to k8s-pb-codegen/out/api.autoscaling.v1.rs diff --git a/out/api.autoscaling.v2beta1.rs b/k8s-pb-codegen/out/api.autoscaling.v2beta1.rs similarity index 100% rename from out/api.autoscaling.v2beta1.rs rename to k8s-pb-codegen/out/api.autoscaling.v2beta1.rs diff --git a/out/api.autoscaling.v2beta2.rs b/k8s-pb-codegen/out/api.autoscaling.v2beta2.rs similarity index 100% rename from out/api.autoscaling.v2beta2.rs rename to k8s-pb-codegen/out/api.autoscaling.v2beta2.rs diff --git a/out/api.batch.v1.rs b/k8s-pb-codegen/out/api.batch.v1.rs similarity index 100% rename from out/api.batch.v1.rs rename to k8s-pb-codegen/out/api.batch.v1.rs diff --git a/out/api.batch.v1beta1.rs b/k8s-pb-codegen/out/api.batch.v1beta1.rs similarity index 100% rename from out/api.batch.v1beta1.rs rename to k8s-pb-codegen/out/api.batch.v1beta1.rs 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 100% rename from out/api.policy.v1.rs rename to k8s-pb-codegen/out/api.policy.v1.rs diff --git a/out/api.policy.v1beta1.rs b/k8s-pb-codegen/out/api.policy.v1beta1.rs similarity index 100% rename from out/api.policy.v1beta1.rs rename to k8s-pb-codegen/out/api.policy.v1beta1.rs 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/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..e69de29 diff --git a/k8s-pb-codegen/src/main.rs b/k8s-pb-codegen/src/main.rs new file mode 100644 index 0000000..a58aff7 --- /dev/null +++ b/k8s-pb-codegen/src/main.rs @@ -0,0 +1,44 @@ +use prost::Message; +use prost_types::FileDescriptorSet; +#[macro_use] +extern crate log; +use anyhow::{Context, Result}; +use std::{fs, path::Path}; + +fn read_file>(path: P) -> Result { + fs::read_to_string(&path).with_context(|| format!("read {}", path.as_ref().display())) +} + +fn main() -> Result<()> { + std::env::set_var("RUST_LOG", "k8s_pb_codegen=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/"])?; + + 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 { + info!("generating {}", pkg); + } + } + + // 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/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..13a7587 --- /dev/null +++ b/k8s-pb/src/lib.rs @@ -0,0 +1,48 @@ +pub mod api { + pub mod v1 { + pub mod core { + // include!(concat!(env!("OUT_DIR"), "/api.core.v1.rs")); + } + } +} + +pub mod apimachinery { + pub mod pkg { + pub mod api { + pub mod resource { + // include!(concat!( + // env!("OUT_DIR"), + // "/apimachinery.pkg.api.resource.rs" + // )); + } + } + + pub mod apis { + pub mod meta { + pub mod v1 { + // include!(concat!( + // env!("OUT_DIR"), + // "/apimachinery.pkg.apis.meta.v1.rs" + // )); + } + } + } + + pub mod runtime { + // include!(concat!(env!("OUT_DIR"), "/apimachinery.pkg.runtime.rs")); + + pub mod schema { + // include!(concat!( + // env!("OUT_DIR"), + // "/apimachinery.pkg.runtime.schema.rs" + // )); + } + } + + pub mod util { + pub mod intstr { + // include!(concat!(env!("OUT_DIR"), "/apimachinery.pkg.util.intstr.rs")); + } + } + } +} diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 7595c58..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,48 +0,0 @@ -pub mod api { - pub mod v1 { - pub mod core { - include!(concat!(env!("OUT_DIR"), "/api.core.v1.rs")); - } - } -} - -pub mod apimachinery { - pub mod pkg { - pub mod api { - pub mod resource { - include!(concat!( - env!("OUT_DIR"), - "/apimachinery.pkg.api.resource.rs" - )); - } - } - - pub mod apis { - pub mod meta { - pub mod v1 { - include!(concat!( - env!("OUT_DIR"), - "/apimachinery.pkg.apis.meta.v1.rs" - )); - } - } - } - - pub mod runtime { - include!(concat!(env!("OUT_DIR"), "/apimachinery.pkg.runtime.rs")); - - pub mod schema { - include!(concat!( - env!("OUT_DIR"), - "/apimachinery.pkg.runtime.schema.rs" - )); - } - } - - pub mod util { - pub mod intstr { - include!(concat!(env!("OUT_DIR"), "/apimachinery.pkg.util.intstr.rs")); - } - } - } -} From f3fbcbcf001c506f4b54235e166b1adfe4baf545 Mon Sep 17 00:00:00 2001 From: kazk Date: Tue, 26 Oct 2021 23:15:06 -0700 Subject: [PATCH 2/8] Add `spec`, `status`, `condition` for new traits Signed-off-by: kazk --- k8s-pb-codegen/openapi/api-resources.json | 351 ++++++++++++++++++++++ k8s-pb-codegen/openapi/list-resources.jq | 35 ++- 2 files changed, 380 insertions(+), 6 deletions(-) diff --git a/k8s-pb-codegen/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json index 2459a3c..07114a8 100644 --- a/k8s-pb-codegen/openapi/api-resources.json +++ b/k8s-pb-codegen/openapi/api-resources.json @@ -11,6 +11,9 @@ "version": "v1", "kind": "MutatingWebhookConfiguration", "rust": "api::admissionregistration::v1::MutatingWebhookConfiguration", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -45,6 +48,9 @@ "version": "v1", "kind": "ValidatingWebhookConfiguration", "rust": "api::admissionregistration::v1::ValidatingWebhookConfiguration", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -84,6 +90,9 @@ "version": "v1", "kind": "CustomResourceDefinition", "rust": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition", + "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", @@ -118,6 +127,9 @@ "version": "v1", "kind": "CustomResourceDefinition", "rust": "apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition", + "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": [ "get", "patch", @@ -148,6 +160,9 @@ "version": "v1", "kind": "APIService", "rust": "kube_aggregator::pkg::apis::apiregistration::v1::APIService", + "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", @@ -182,6 +197,9 @@ "version": "v1", "kind": "APIService", "rust": "kube_aggregator::pkg::apis::apiregistration::v1::APIService", + "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": [ "get", "patch", @@ -212,6 +230,9 @@ "version": "v1", "kind": "ControllerRevision", "rust": "api::apps::v1::ControllerRevision", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -250,6 +271,9 @@ "version": "v1", "kind": "DaemonSet", "rust": "api::apps::v1::DaemonSet", + "spec": "api::apps::v1::DaemonSetSpec", + "status": "api::apps::v1::DaemonSetStatus", + "condition": "api::apps::v1::DaemonSetCondition", "verbs": [ "create", "delete", @@ -288,6 +312,9 @@ "version": "v1", "kind": "DaemonSet", "rust": "api::apps::v1::DaemonSet", + "spec": "api::apps::v1::DaemonSetSpec", + "status": "api::apps::v1::DaemonSetStatus", + "condition": "api::apps::v1::DaemonSetCondition", "verbs": [ "get", "patch", @@ -313,6 +340,9 @@ "version": "v1", "kind": "Deployment", "rust": "api::apps::v1::Deployment", + "spec": "api::apps::v1::DeploymentSpec", + "status": "api::apps::v1::DeploymentStatus", + "condition": "api::apps::v1::DeploymentCondition", "verbs": [ "create", "delete", @@ -351,6 +381,9 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "spec": "api::autoscaling::v1::ScaleSpec", + "status": "api::autoscaling::v1::ScaleStatus", + "condition": null, "verbs": [ "get", "patch", @@ -376,6 +409,9 @@ "version": "v1", "kind": "Deployment", "rust": "api::apps::v1::Deployment", + "spec": "api::apps::v1::DeploymentSpec", + "status": "api::apps::v1::DeploymentStatus", + "condition": "api::apps::v1::DeploymentCondition", "verbs": [ "get", "patch", @@ -401,6 +437,9 @@ "version": "v1", "kind": "ReplicaSet", "rust": "api::apps::v1::ReplicaSet", + "spec": "api::apps::v1::ReplicaSetSpec", + "status": "api::apps::v1::ReplicaSetStatus", + "condition": "api::apps::v1::ReplicaSetCondition", "verbs": [ "create", "delete", @@ -439,6 +478,9 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "spec": "api::autoscaling::v1::ScaleSpec", + "status": "api::autoscaling::v1::ScaleStatus", + "condition": null, "verbs": [ "get", "patch", @@ -464,6 +506,9 @@ "version": "v1", "kind": "ReplicaSet", "rust": "api::apps::v1::ReplicaSet", + "spec": "api::apps::v1::ReplicaSetSpec", + "status": "api::apps::v1::ReplicaSetStatus", + "condition": "api::apps::v1::ReplicaSetCondition", "verbs": [ "get", "patch", @@ -489,6 +534,9 @@ "version": "v1", "kind": "StatefulSet", "rust": "api::apps::v1::StatefulSet", + "spec": "api::apps::v1::StatefulSetSpec", + "status": "api::apps::v1::StatefulSetStatus", + "condition": "api::apps::v1::StatefulSetCondition", "verbs": [ "create", "delete", @@ -527,6 +575,9 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "spec": "api::autoscaling::v1::ScaleSpec", + "status": "api::autoscaling::v1::ScaleStatus", + "condition": null, "verbs": [ "get", "patch", @@ -552,6 +603,9 @@ "version": "v1", "kind": "StatefulSet", "rust": "api::apps::v1::StatefulSet", + "spec": "api::apps::v1::StatefulSetSpec", + "status": "api::apps::v1::StatefulSetStatus", + "condition": "api::apps::v1::StatefulSetCondition", "verbs": [ "get", "patch", @@ -582,6 +636,9 @@ "version": "v1", "kind": "TokenReview", "rust": "api::authentication::v1::TokenReview", + "spec": "api::authentication::v1::TokenReviewSpec", + "status": "api::authentication::v1::TokenReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -608,6 +665,9 @@ "version": "v1", "kind": "LocalSubjectAccessReview", "rust": "api::authorization::v1::LocalSubjectAccessReview", + "spec": "api::authorization::v1::SubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -629,6 +689,9 @@ "version": "v1", "kind": "SelfSubjectAccessReview", "rust": "api::authorization::v1::SelfSubjectAccessReview", + "spec": "api::authorization::v1::SelfSubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -650,6 +713,9 @@ "version": "v1", "kind": "SelfSubjectRulesReview", "rust": "api::authorization::v1::SelfSubjectRulesReview", + "spec": "api::authorization::v1::SelfSubjectRulesReviewSpec", + "status": "api::authorization::v1::SubjectRulesReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -671,6 +737,9 @@ "version": "v1", "kind": "SubjectAccessReview", "rust": "api::authorization::v1::SubjectAccessReview", + "spec": "api::authorization::v1::SubjectAccessReviewSpec", + "status": "api::authorization::v1::SubjectAccessReviewStatus", + "condition": null, "verbs": [ "create" ], @@ -697,6 +766,9 @@ "version": "v1", "kind": "HorizontalPodAutoscaler", "rust": "api::autoscaling::v1::HorizontalPodAutoscaler", + "spec": "api::autoscaling::v1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v1::HorizontalPodAutoscalerStatus", + "condition": null, "verbs": [ "create", "delete", @@ -735,6 +807,9 @@ "version": "v1", "kind": "HorizontalPodAutoscaler", "rust": "api::autoscaling::v1::HorizontalPodAutoscaler", + "spec": "api::autoscaling::v1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v1::HorizontalPodAutoscalerStatus", + "condition": null, "verbs": [ "get", "patch", @@ -765,6 +840,9 @@ "version": "v2beta1", "kind": "HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", + "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta1::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta1::HorizontalPodAutoscalerCondition", "verbs": [ "create", "delete", @@ -803,6 +881,9 @@ "version": "v2beta1", "kind": "HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", + "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta1::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta1::HorizontalPodAutoscalerCondition", "verbs": [ "get", "patch", @@ -833,6 +914,9 @@ "version": "v2beta2", "kind": "HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta2::HorizontalPodAutoscaler", + "spec": "api::autoscaling::v2beta2::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta2::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta2::HorizontalPodAutoscalerCondition", "verbs": [ "create", "delete", @@ -871,6 +955,9 @@ "version": "v2beta2", "kind": "HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta2::HorizontalPodAutoscaler", + "spec": "api::autoscaling::v2beta2::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta2::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta2::HorizontalPodAutoscalerCondition", "verbs": [ "get", "patch", @@ -901,6 +988,9 @@ "version": "v1", "kind": "CronJob", "rust": "api::batch::v1::CronJob", + "spec": "api::batch::v1::CronJobSpec", + "status": "api::batch::v1::CronJobStatus", + "condition": null, "verbs": [ "create", "delete", @@ -939,6 +1029,9 @@ "version": "v1", "kind": "CronJob", "rust": "api::batch::v1::CronJob", + "spec": "api::batch::v1::CronJobSpec", + "status": "api::batch::v1::CronJobStatus", + "condition": null, "verbs": [ "get", "patch", @@ -964,6 +1057,9 @@ "version": "v1", "kind": "Job", "rust": "api::batch::v1::Job", + "spec": "api::batch::v1::JobSpec", + "status": "api::batch::v1::JobStatus", + "condition": "api::batch::v1::JobCondition", "verbs": [ "create", "delete", @@ -1002,6 +1098,9 @@ "version": "v1", "kind": "Job", "rust": "api::batch::v1::Job", + "spec": "api::batch::v1::JobSpec", + "status": "api::batch::v1::JobStatus", + "condition": "api::batch::v1::JobCondition", "verbs": [ "get", "patch", @@ -1032,6 +1131,9 @@ "version": "v1beta1", "kind": "CronJob", "rust": "api::batch::v1beta1::CronJob", + "spec": "api::batch::v1beta1::CronJobSpec", + "status": "api::batch::v1beta1::CronJobStatus", + "condition": null, "verbs": [ "create", "delete", @@ -1070,6 +1172,9 @@ "version": "v1beta1", "kind": "CronJob", "rust": "api::batch::v1beta1::CronJob", + "spec": "api::batch::v1beta1::CronJobSpec", + "status": "api::batch::v1beta1::CronJobStatus", + "condition": null, "verbs": [ "get", "patch", @@ -1100,6 +1205,9 @@ "version": "v1", "kind": "CertificateSigningRequest", "rust": "api::certificates::v1::CertificateSigningRequest", + "spec": "api::certificates::v1::CertificateSigningRequestSpec", + "status": "api::certificates::v1::CertificateSigningRequestStatus", + "condition": "api::certificates::v1::CertificateSigningRequestCondition", "verbs": [ "create", "delete", @@ -1134,6 +1242,9 @@ "version": "v1", "kind": "CertificateSigningRequest", "rust": "api::certificates::v1::CertificateSigningRequest", + "spec": "api::certificates::v1::CertificateSigningRequestSpec", + "status": "api::certificates::v1::CertificateSigningRequestStatus", + "condition": "api::certificates::v1::CertificateSigningRequestCondition", "verbs": [ "get", "patch", @@ -1159,6 +1270,9 @@ "version": "v1", "kind": "CertificateSigningRequest", "rust": "api::certificates::v1::CertificateSigningRequest", + "spec": "api::certificates::v1::CertificateSigningRequestSpec", + "status": "api::certificates::v1::CertificateSigningRequestStatus", + "condition": "api::certificates::v1::CertificateSigningRequestCondition", "verbs": [ "get", "patch", @@ -1189,6 +1303,9 @@ "version": "v1", "kind": "Lease", "rust": "api::coordination::v1::Lease", + "spec": "api::coordination::v1::LeaseSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1232,6 +1349,9 @@ "version": "v1", "kind": "EndpointSlice", "rust": "api::discovery::v1::EndpointSlice", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1275,6 +1395,9 @@ "version": "v1beta1", "kind": "EndpointSlice", "rust": "api::discovery::v1beta1::EndpointSlice", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1318,6 +1441,9 @@ "version": "v1", "kind": "Event", "rust": "api::events::v1::Event", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1361,6 +1487,9 @@ "version": "v1beta1", "kind": "Event", "rust": "api::events::v1beta1::Event", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1404,6 +1533,9 @@ "version": "v1beta1", "kind": "FlowSchema", "rust": "api::flowcontrol::v1beta1::FlowSchema", + "spec": "api::flowcontrol::v1beta1::FlowSchemaSpec", + "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", + "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", "verbs": [ "create", "delete", @@ -1438,6 +1570,9 @@ "version": "v1beta1", "kind": "FlowSchema", "rust": "api::flowcontrol::v1beta1::FlowSchema", + "spec": "api::flowcontrol::v1beta1::FlowSchemaSpec", + "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", + "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", "verbs": [ "get", "patch", @@ -1463,6 +1598,9 @@ "version": "v1beta1", "kind": "PriorityLevelConfiguration", "rust": "api::flowcontrol::v1beta1::PriorityLevelConfiguration", + "spec": "api::flowcontrol::v1beta1::PriorityLevelConfigurationSpec", + "status": "api::flowcontrol::v1beta1::PriorityLevelConfigurationStatus", + "condition": "api::flowcontrol::v1beta1::PriorityLevelConfigurationCondition", "verbs": [ "create", "delete", @@ -1497,6 +1635,9 @@ "version": "v1beta1", "kind": "PriorityLevelConfiguration", "rust": "api::flowcontrol::v1beta1::PriorityLevelConfiguration", + "spec": "api::flowcontrol::v1beta1::PriorityLevelConfigurationSpec", + "status": "api::flowcontrol::v1beta1::PriorityLevelConfigurationStatus", + "condition": "api::flowcontrol::v1beta1::PriorityLevelConfigurationCondition", "verbs": [ "get", "patch", @@ -1527,6 +1668,9 @@ "version": "v1alpha1", "kind": "StorageVersion", "rust": "api::apiserverinternal::v1alpha1::StorageVersion", + "spec": "api::apiserverinternal::v1alpha1::StorageVersionSpec", + "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", + "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", "verbs": [ "create", "delete", @@ -1561,6 +1705,9 @@ "version": "v1alpha1", "kind": "StorageVersion", "rust": "api::apiserverinternal::v1alpha1::StorageVersion", + "spec": "api::apiserverinternal::v1alpha1::StorageVersionSpec", + "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", + "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", "verbs": [ "get", "patch", @@ -1591,6 +1738,9 @@ "version": "v1", "kind": "IngressClass", "rust": "api::networking::v1::IngressClass", + "spec": "api::networking::v1::IngressClassSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1625,6 +1775,9 @@ "version": "v1", "kind": "Ingress", "rust": "api::networking::v1::Ingress", + "spec": "api::networking::v1::IngressSpec", + "status": "api::networking::v1::IngressStatus", + "condition": null, "verbs": [ "create", "delete", @@ -1663,6 +1816,9 @@ "version": "v1", "kind": "Ingress", "rust": "api::networking::v1::Ingress", + "spec": "api::networking::v1::IngressSpec", + "status": "api::networking::v1::IngressStatus", + "condition": null, "verbs": [ "get", "patch", @@ -1688,6 +1844,9 @@ "version": "v1", "kind": "NetworkPolicy", "rust": "api::networking::v1::NetworkPolicy", + "spec": "api::networking::v1::NetworkPolicySpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1731,6 +1890,9 @@ "version": "v1", "kind": "RuntimeClass", "rust": "api::node::v1::RuntimeClass", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1770,6 +1932,9 @@ "version": "v1alpha1", "kind": "RuntimeClass", "rust": "api::node::v1alpha1::RuntimeClass", + "spec": "api::node::v1alpha1::RuntimeClassSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1809,6 +1974,9 @@ "version": "v1beta1", "kind": "RuntimeClass", "rust": "api::node::v1beta1::RuntimeClass", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -1848,6 +2016,9 @@ "version": "v1", "kind": "PodDisruptionBudget", "rust": "api::policy::v1::PodDisruptionBudget", + "spec": "api::policy::v1::PodDisruptionBudgetSpec", + "status": "api::policy::v1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "create", "delete", @@ -1886,6 +2057,9 @@ "version": "v1", "kind": "PodDisruptionBudget", "rust": "api::policy::v1::PodDisruptionBudget", + "spec": "api::policy::v1::PodDisruptionBudgetSpec", + "status": "api::policy::v1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "get", "patch", @@ -1916,6 +2090,9 @@ "version": "v1beta1", "kind": "PodDisruptionBudget", "rust": "api::policy::v1beta1::PodDisruptionBudget", + "spec": "api::policy::v1beta1::PodDisruptionBudgetSpec", + "status": "api::policy::v1beta1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "create", "delete", @@ -1954,6 +2131,9 @@ "version": "v1beta1", "kind": "PodDisruptionBudget", "rust": "api::policy::v1beta1::PodDisruptionBudget", + "spec": "api::policy::v1beta1::PodDisruptionBudgetSpec", + "status": "api::policy::v1beta1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "get", "patch", @@ -1979,6 +2159,9 @@ "version": "v1beta1", "kind": "PodSecurityPolicy", "rust": "api::policy::v1beta1::PodSecurityPolicy", + "spec": "api::policy::v1beta1::PodSecurityPolicySpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2018,6 +2201,9 @@ "version": "v1", "kind": "ClusterRoleBinding", "rust": "api::rbac::v1::ClusterRoleBinding", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2052,6 +2238,9 @@ "version": "v1", "kind": "ClusterRole", "rust": "api::rbac::v1::ClusterRole", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2086,6 +2275,9 @@ "version": "v1", "kind": "RoleBinding", "rust": "api::rbac::v1::RoleBinding", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2124,6 +2316,9 @@ "version": "v1", "kind": "Role", "rust": "api::rbac::v1::Role", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2167,6 +2362,9 @@ "version": "v1alpha1", "kind": "ClusterRoleBinding", "rust": "api::rbac::v1alpha1::ClusterRoleBinding", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2201,6 +2399,9 @@ "version": "v1alpha1", "kind": "ClusterRole", "rust": "api::rbac::v1alpha1::ClusterRole", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2235,6 +2436,9 @@ "version": "v1alpha1", "kind": "RoleBinding", "rust": "api::rbac::v1alpha1::RoleBinding", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2273,6 +2477,9 @@ "version": "v1alpha1", "kind": "Role", "rust": "api::rbac::v1alpha1::Role", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2316,6 +2523,9 @@ "version": "v1", "kind": "PriorityClass", "rust": "api::scheduling::v1::PriorityClass", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2355,6 +2565,9 @@ "version": "v1alpha1", "kind": "PriorityClass", "rust": "api::scheduling::v1alpha1::PriorityClass", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2394,6 +2607,9 @@ "version": "v1", "kind": "CSIDriver", "rust": "api::storage::v1::CSIDriver", + "spec": "api::storage::v1::CSIDriverSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2428,6 +2644,9 @@ "version": "v1", "kind": "CSINode", "rust": "api::storage::v1::CSINode", + "spec": "api::storage::v1::CSINodeSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2462,6 +2681,9 @@ "version": "v1", "kind": "StorageClass", "rust": "api::storage::v1::StorageClass", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2496,6 +2718,9 @@ "version": "v1", "kind": "VolumeAttachment", "rust": "api::storage::v1::VolumeAttachment", + "spec": "api::storage::v1::VolumeAttachmentSpec", + "status": "api::storage::v1::VolumeAttachmentStatus", + "condition": null, "verbs": [ "create", "delete", @@ -2530,6 +2755,9 @@ "version": "v1", "kind": "VolumeAttachment", "rust": "api::storage::v1::VolumeAttachment", + "spec": "api::storage::v1::VolumeAttachmentSpec", + "status": "api::storage::v1::VolumeAttachmentStatus", + "condition": null, "verbs": [ "get", "patch", @@ -2560,6 +2788,9 @@ "version": "v1alpha1", "kind": "CSIStorageCapacity", "rust": "api::storage::v1alpha1::CSIStorageCapacity", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2598,6 +2829,9 @@ "version": "v1alpha1", "kind": "VolumeAttachment", "rust": "api::storage::v1alpha1::VolumeAttachment", + "spec": "api::storage::v1alpha1::VolumeAttachmentSpec", + "status": "api::storage::v1alpha1::VolumeAttachmentStatus", + "condition": null, "verbs": [ "create", "delete", @@ -2637,6 +2871,9 @@ "version": "v1beta1", "kind": "CSIStorageCapacity", "rust": "api::storage::v1beta1::CSIStorageCapacity", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2680,6 +2917,9 @@ "version": "v1", "kind": "Binding", "rust": "api::core::v1::Binding", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create" ], @@ -2701,6 +2941,9 @@ "version": "v1", "kind": "ComponentStatus", "rust": "api::core::v1::ComponentStatus", + "spec": null, + "status": null, + "condition": null, "verbs": [ "get", "list" @@ -2725,6 +2968,9 @@ "version": "v1", "kind": "ConfigMap", "rust": "api::core::v1::ConfigMap", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2763,6 +3009,9 @@ "version": "v1", "kind": "Endpoints", "rust": "api::core::v1::Endpoints", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2801,6 +3050,9 @@ "version": "v1", "kind": "Event", "rust": "api::core::v1::Event", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2839,6 +3091,9 @@ "version": "v1", "kind": "LimitRange", "rust": "api::core::v1::LimitRange", + "spec": "api::core::v1::LimitRangeSpec", + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -2877,6 +3132,9 @@ "version": "v1", "kind": "Namespace", "rust": "api::core::v1::Namespace", + "spec": "api::core::v1::NamespaceSpec", + "status": "api::core::v1::NamespaceStatus", + "condition": "api::core::v1::NamespaceCondition", "verbs": [ "create", "delete", @@ -2909,6 +3167,9 @@ "version": "v1", "kind": "Namespace", "rust": "api::core::v1::Namespace", + "spec": "api::core::v1::NamespaceSpec", + "status": "api::core::v1::NamespaceStatus", + "condition": "api::core::v1::NamespaceCondition", "verbs": [ "update" ], @@ -2930,6 +3191,9 @@ "version": "v1", "kind": "Namespace", "rust": "api::core::v1::Namespace", + "spec": "api::core::v1::NamespaceSpec", + "status": "api::core::v1::NamespaceStatus", + "condition": "api::core::v1::NamespaceCondition", "verbs": [ "get", "patch", @@ -2955,6 +3219,9 @@ "version": "v1", "kind": "Node", "rust": "api::core::v1::Node", + "spec": "api::core::v1::NodeSpec", + "status": "api::core::v1::NodeStatus", + "condition": "api::core::v1::NodeCondition", "verbs": [ "create", "delete", @@ -2989,6 +3256,9 @@ "version": "v1", "kind": "Node", "rust": "api::core::v1::Node", + "spec": "api::core::v1::NodeSpec", + "status": "api::core::v1::NodeStatus", + "condition": "api::core::v1::NodeCondition", "verbs": [ "connect" ], @@ -3011,6 +3281,9 @@ "version": "v1", "kind": "Node", "rust": "api::core::v1::Node", + "spec": "api::core::v1::NodeSpec", + "status": "api::core::v1::NodeStatus", + "condition": "api::core::v1::NodeCondition", "verbs": [ "get", "patch", @@ -3036,6 +3309,9 @@ "version": "v1", "kind": "PersistentVolumeClaim", "rust": "api::core::v1::PersistentVolumeClaim", + "spec": "api::core::v1::PersistentVolumeClaimSpec", + "status": "api::core::v1::PersistentVolumeClaimStatus", + "condition": "api::core::v1::PersistentVolumeClaimCondition", "verbs": [ "create", "delete", @@ -3074,6 +3350,9 @@ "version": "v1", "kind": "PersistentVolumeClaim", "rust": "api::core::v1::PersistentVolumeClaim", + "spec": "api::core::v1::PersistentVolumeClaimSpec", + "status": "api::core::v1::PersistentVolumeClaimStatus", + "condition": "api::core::v1::PersistentVolumeClaimCondition", "verbs": [ "get", "patch", @@ -3099,6 +3378,9 @@ "version": "v1", "kind": "PersistentVolume", "rust": "api::core::v1::PersistentVolume", + "spec": "api::core::v1::PersistentVolumeSpec", + "status": "api::core::v1::PersistentVolumeStatus", + "condition": null, "verbs": [ "create", "delete", @@ -3133,6 +3415,9 @@ "version": "v1", "kind": "PersistentVolume", "rust": "api::core::v1::PersistentVolume", + "spec": "api::core::v1::PersistentVolumeSpec", + "status": "api::core::v1::PersistentVolumeStatus", + "condition": null, "verbs": [ "get", "patch", @@ -3158,6 +3443,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "create", "delete", @@ -3196,6 +3484,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "connect" ], @@ -3217,6 +3508,9 @@ "version": "v1", "kind": "Binding", "rust": "api::core::v1::Binding", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create" ], @@ -3238,6 +3532,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "get", "patch", @@ -3263,6 +3560,9 @@ "version": "v1", "kind": "Eviction", "rust": "api::policy::v1::Eviction", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create" ], @@ -3284,6 +3584,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "connect" ], @@ -3305,6 +3608,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "get" ], @@ -3326,6 +3632,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "connect" ], @@ -3347,6 +3656,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "connect" ], @@ -3369,6 +3681,9 @@ "version": "v1", "kind": "Pod", "rust": "api::core::v1::Pod", + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "verbs": [ "get", "patch", @@ -3394,6 +3709,9 @@ "version": "v1", "kind": "PodTemplate", "rust": "api::core::v1::PodTemplate", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -3432,6 +3750,9 @@ "version": "v1", "kind": "ReplicationController", "rust": "api::core::v1::ReplicationController", + "spec": "api::core::v1::ReplicationControllerSpec", + "status": "api::core::v1::ReplicationControllerStatus", + "condition": "api::core::v1::ReplicationControllerCondition", "verbs": [ "create", "delete", @@ -3470,6 +3791,9 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "spec": "api::autoscaling::v1::ScaleSpec", + "status": "api::autoscaling::v1::ScaleStatus", + "condition": null, "verbs": [ "get", "patch", @@ -3495,6 +3819,9 @@ "version": "v1", "kind": "ReplicationController", "rust": "api::core::v1::ReplicationController", + "spec": "api::core::v1::ReplicationControllerSpec", + "status": "api::core::v1::ReplicationControllerStatus", + "condition": "api::core::v1::ReplicationControllerCondition", "verbs": [ "get", "patch", @@ -3520,6 +3847,9 @@ "version": "v1", "kind": "ResourceQuota", "rust": "api::core::v1::ResourceQuota", + "spec": "api::core::v1::ResourceQuotaSpec", + "status": "api::core::v1::ResourceQuotaStatus", + "condition": null, "verbs": [ "create", "delete", @@ -3558,6 +3888,9 @@ "version": "v1", "kind": "ResourceQuota", "rust": "api::core::v1::ResourceQuota", + "spec": "api::core::v1::ResourceQuotaSpec", + "status": "api::core::v1::ResourceQuotaStatus", + "condition": null, "verbs": [ "get", "patch", @@ -3583,6 +3916,9 @@ "version": "v1", "kind": "Secret", "rust": "api::core::v1::Secret", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -3621,6 +3957,9 @@ "version": "v1", "kind": "ServiceAccount", "rust": "api::core::v1::ServiceAccount", + "spec": null, + "status": null, + "condition": null, "verbs": [ "create", "delete", @@ -3659,6 +3998,9 @@ "version": "v1", "kind": "TokenRequest", "rust": "api::authentication::v1::TokenRequest", + "spec": "api::authentication::v1::TokenRequestSpec", + "status": "api::authentication::v1::TokenRequestStatus", + "condition": null, "verbs": [ "create" ], @@ -3680,6 +4022,9 @@ "version": "v1", "kind": "Service", "rust": "api::core::v1::Service", + "spec": "api::core::v1::ServiceSpec", + "status": "api::core::v1::ServiceStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "create", "delete", @@ -3716,6 +4061,9 @@ "version": "v1", "kind": "Service", "rust": "api::core::v1::Service", + "spec": "api::core::v1::ServiceSpec", + "status": "api::core::v1::ServiceStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "connect" ], @@ -3738,6 +4086,9 @@ "version": "v1", "kind": "Service", "rust": "api::core::v1::Service", + "spec": "api::core::v1::ServiceSpec", + "status": "api::core::v1::ServiceStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "verbs": [ "get", "patch", diff --git a/k8s-pb-codegen/openapi/list-resources.jq b/k8s-pb-codegen/openapi/list-resources.jq index 4389b54..8d3980e 100644 --- a/k8s-pb-codegen/openapi/list-resources.jq +++ b/k8s-pb-codegen/openapi/list-resources.jq @@ -1,17 +1,33 @@ +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?.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: { + rust: .key | to_rust, + spec: $spec, + status: $statusName | fmap(to_rust), + condition: $condition, + }, + } ] | sort_by(.key) | from_entries -) as $rustPaths +) as $definitions | [ .paths | to_entries[] @@ -26,6 +42,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 +59,10 @@ group: $gvk.group, version: $gvk.version, subresource: ($path | test("\\{name\\}/")), - rust: $rustPaths[([$gvk.group, $gvk.version, $gvk.kind] | map(select(. != "")) | join("/"))], + rust: $definition.rust, + spec: $definition.spec, + status: $definition.status, + condition: $definition.condition, path: $path, } ] @@ -61,6 +81,9 @@ version: .[0].version, kind: .[0].kind, rust: .[0].rust, + spec: .[0].spec, + status: .[0].status, + condition: .[0].condition, verbs: (map(.verb) | unique), scopedVerbs: ( group_by(.namespaced) From 84380f8f140af47fdcf74a166f4f92b4c687fb98 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 00:37:17 -0700 Subject: [PATCH 3/8] Add `metadata` type Signed-off-by: kazk --- k8s-pb-codegen/openapi/api-resources.json | 117 ++++++++++++++++++++++ k8s-pb-codegen/openapi/list-resources.jq | 4 + 2 files changed, 121 insertions(+) diff --git a/k8s-pb-codegen/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json index 07114a8..234037c 100644 --- a/k8s-pb-codegen/openapi/api-resources.json +++ b/k8s-pb-codegen/openapi/api-resources.json @@ -11,6 +11,7 @@ "version": "v1", "kind": "MutatingWebhookConfiguration", "rust": "api::admissionregistration::v1::MutatingWebhookConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -48,6 +49,7 @@ "version": "v1", "kind": "ValidatingWebhookConfiguration", "rust": "api::admissionregistration::v1::ValidatingWebhookConfiguration", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -90,6 +92,7 @@ "version": "v1", "kind": "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", @@ -127,6 +130,7 @@ "version": "v1", "kind": "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", @@ -160,6 +164,7 @@ "version": "v1", "kind": "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", @@ -197,6 +202,7 @@ "version": "v1", "kind": "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", @@ -230,6 +236,7 @@ "version": "v1", "kind": "ControllerRevision", "rust": "api::apps::v1::ControllerRevision", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -271,6 +278,7 @@ "version": "v1", "kind": "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", @@ -312,6 +320,7 @@ "version": "v1", "kind": "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", @@ -340,6 +349,7 @@ "version": "v1", "kind": "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", @@ -381,6 +391,7 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::autoscaling::v1::ScaleSpec", "status": "api::autoscaling::v1::ScaleStatus", "condition": null, @@ -409,6 +420,7 @@ "version": "v1", "kind": "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", @@ -437,6 +449,7 @@ "version": "v1", "kind": "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", @@ -478,6 +491,7 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::autoscaling::v1::ScaleSpec", "status": "api::autoscaling::v1::ScaleStatus", "condition": null, @@ -506,6 +520,7 @@ "version": "v1", "kind": "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", @@ -534,6 +549,7 @@ "version": "v1", "kind": "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", @@ -575,6 +591,7 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::autoscaling::v1::ScaleSpec", "status": "api::autoscaling::v1::ScaleStatus", "condition": null, @@ -603,6 +620,7 @@ "version": "v1", "kind": "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", @@ -636,6 +654,7 @@ "version": "v1", "kind": "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, @@ -665,6 +684,7 @@ "version": "v1", "kind": "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, @@ -689,6 +709,7 @@ "version": "v1", "kind": "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, @@ -713,6 +734,7 @@ "version": "v1", "kind": "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, @@ -737,6 +759,7 @@ "version": "v1", "kind": "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, @@ -766,6 +789,7 @@ "version": "v1", "kind": "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, @@ -807,6 +831,7 @@ "version": "v1", "kind": "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, @@ -840,6 +865,7 @@ "version": "v2beta1", "kind": "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", @@ -881,6 +907,7 @@ "version": "v2beta1", "kind": "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", @@ -914,6 +941,7 @@ "version": "v2beta2", "kind": "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", @@ -955,6 +983,7 @@ "version": "v2beta2", "kind": "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", @@ -988,6 +1017,7 @@ "version": "v1", "kind": "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, @@ -1029,6 +1059,7 @@ "version": "v1", "kind": "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, @@ -1057,6 +1088,7 @@ "version": "v1", "kind": "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", @@ -1098,6 +1130,7 @@ "version": "v1", "kind": "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", @@ -1131,6 +1164,7 @@ "version": "v1beta1", "kind": "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, @@ -1172,6 +1206,7 @@ "version": "v1beta1", "kind": "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, @@ -1205,6 +1240,7 @@ "version": "v1", "kind": "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", @@ -1242,6 +1278,7 @@ "version": "v1", "kind": "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", @@ -1270,6 +1307,7 @@ "version": "v1", "kind": "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", @@ -1303,6 +1341,7 @@ "version": "v1", "kind": "Lease", "rust": "api::coordination::v1::Lease", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::coordination::v1::LeaseSpec", "status": null, "condition": null, @@ -1349,6 +1388,7 @@ "version": "v1", "kind": "EndpointSlice", "rust": "api::discovery::v1::EndpointSlice", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -1395,6 +1435,7 @@ "version": "v1beta1", "kind": "EndpointSlice", "rust": "api::discovery::v1beta1::EndpointSlice", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -1441,6 +1482,7 @@ "version": "v1", "kind": "Event", "rust": "api::events::v1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -1487,6 +1529,7 @@ "version": "v1beta1", "kind": "Event", "rust": "api::events::v1beta1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -1533,6 +1576,7 @@ "version": "v1beta1", "kind": "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", @@ -1570,6 +1614,7 @@ "version": "v1beta1", "kind": "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", @@ -1598,6 +1643,7 @@ "version": "v1beta1", "kind": "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", @@ -1635,6 +1681,7 @@ "version": "v1beta1", "kind": "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", @@ -1668,6 +1715,7 @@ "version": "v1alpha1", "kind": "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", @@ -1705,6 +1753,7 @@ "version": "v1alpha1", "kind": "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", @@ -1738,6 +1787,7 @@ "version": "v1", "kind": "IngressClass", "rust": "api::networking::v1::IngressClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::networking::v1::IngressClassSpec", "status": null, "condition": null, @@ -1775,6 +1825,7 @@ "version": "v1", "kind": "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, @@ -1816,6 +1867,7 @@ "version": "v1", "kind": "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, @@ -1844,6 +1896,7 @@ "version": "v1", "kind": "NetworkPolicy", "rust": "api::networking::v1::NetworkPolicy", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::networking::v1::NetworkPolicySpec", "status": null, "condition": null, @@ -1890,6 +1943,7 @@ "version": "v1", "kind": "RuntimeClass", "rust": "api::node::v1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -1932,6 +1986,7 @@ "version": "v1alpha1", "kind": "RuntimeClass", "rust": "api::node::v1alpha1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::node::v1alpha1::RuntimeClassSpec", "status": null, "condition": null, @@ -1974,6 +2029,7 @@ "version": "v1beta1", "kind": "RuntimeClass", "rust": "api::node::v1beta1::RuntimeClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2016,6 +2072,7 @@ "version": "v1", "kind": "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", @@ -2057,6 +2114,7 @@ "version": "v1", "kind": "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", @@ -2090,6 +2148,7 @@ "version": "v1beta1", "kind": "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", @@ -2131,6 +2190,7 @@ "version": "v1beta1", "kind": "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", @@ -2159,6 +2219,7 @@ "version": "v1beta1", "kind": "PodSecurityPolicy", "rust": "api::policy::v1beta1::PodSecurityPolicy", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::policy::v1beta1::PodSecurityPolicySpec", "status": null, "condition": null, @@ -2201,6 +2262,7 @@ "version": "v1", "kind": "ClusterRoleBinding", "rust": "api::rbac::v1::ClusterRoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2238,6 +2300,7 @@ "version": "v1", "kind": "ClusterRole", "rust": "api::rbac::v1::ClusterRole", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2275,6 +2338,7 @@ "version": "v1", "kind": "RoleBinding", "rust": "api::rbac::v1::RoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2316,6 +2380,7 @@ "version": "v1", "kind": "Role", "rust": "api::rbac::v1::Role", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2362,6 +2427,7 @@ "version": "v1alpha1", "kind": "ClusterRoleBinding", "rust": "api::rbac::v1alpha1::ClusterRoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2399,6 +2465,7 @@ "version": "v1alpha1", "kind": "ClusterRole", "rust": "api::rbac::v1alpha1::ClusterRole", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2436,6 +2503,7 @@ "version": "v1alpha1", "kind": "RoleBinding", "rust": "api::rbac::v1alpha1::RoleBinding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2477,6 +2545,7 @@ "version": "v1alpha1", "kind": "Role", "rust": "api::rbac::v1alpha1::Role", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2523,6 +2592,7 @@ "version": "v1", "kind": "PriorityClass", "rust": "api::scheduling::v1::PriorityClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2565,6 +2635,7 @@ "version": "v1alpha1", "kind": "PriorityClass", "rust": "api::scheduling::v1alpha1::PriorityClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2607,6 +2678,7 @@ "version": "v1", "kind": "CSIDriver", "rust": "api::storage::v1::CSIDriver", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::storage::v1::CSIDriverSpec", "status": null, "condition": null, @@ -2644,6 +2716,7 @@ "version": "v1", "kind": "CSINode", "rust": "api::storage::v1::CSINode", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::storage::v1::CSINodeSpec", "status": null, "condition": null, @@ -2681,6 +2754,7 @@ "version": "v1", "kind": "StorageClass", "rust": "api::storage::v1::StorageClass", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2718,6 +2792,7 @@ "version": "v1", "kind": "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, @@ -2755,6 +2830,7 @@ "version": "v1", "kind": "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, @@ -2788,6 +2864,7 @@ "version": "v1alpha1", "kind": "CSIStorageCapacity", "rust": "api::storage::v1alpha1::CSIStorageCapacity", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2829,6 +2906,7 @@ "version": "v1alpha1", "kind": "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, @@ -2871,6 +2949,7 @@ "version": "v1beta1", "kind": "CSIStorageCapacity", "rust": "api::storage::v1beta1::CSIStorageCapacity", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2917,6 +2996,7 @@ "version": "v1", "kind": "Binding", "rust": "api::core::v1::Binding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2941,6 +3021,7 @@ "version": "v1", "kind": "ComponentStatus", "rust": "api::core::v1::ComponentStatus", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -2968,6 +3049,7 @@ "version": "v1", "kind": "ConfigMap", "rust": "api::core::v1::ConfigMap", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3009,6 +3091,7 @@ "version": "v1", "kind": "Endpoints", "rust": "api::core::v1::Endpoints", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3050,6 +3133,7 @@ "version": "v1", "kind": "Event", "rust": "api::core::v1::Event", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3091,6 +3175,7 @@ "version": "v1", "kind": "LimitRange", "rust": "api::core::v1::LimitRange", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::core::v1::LimitRangeSpec", "status": null, "condition": null, @@ -3132,6 +3217,7 @@ "version": "v1", "kind": "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", @@ -3167,6 +3253,7 @@ "version": "v1", "kind": "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", @@ -3191,6 +3278,7 @@ "version": "v1", "kind": "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", @@ -3219,6 +3307,7 @@ "version": "v1", "kind": "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", @@ -3256,6 +3345,7 @@ "version": "v1", "kind": "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", @@ -3281,6 +3371,7 @@ "version": "v1", "kind": "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", @@ -3309,6 +3400,7 @@ "version": "v1", "kind": "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", @@ -3350,6 +3442,7 @@ "version": "v1", "kind": "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", @@ -3378,6 +3471,7 @@ "version": "v1", "kind": "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, @@ -3415,6 +3509,7 @@ "version": "v1", "kind": "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, @@ -3443,6 +3538,7 @@ "version": "v1", "kind": "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", @@ -3484,6 +3580,7 @@ "version": "v1", "kind": "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", @@ -3508,6 +3605,7 @@ "version": "v1", "kind": "Binding", "rust": "api::core::v1::Binding", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3532,6 +3630,7 @@ "version": "v1", "kind": "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", @@ -3560,6 +3659,7 @@ "version": "v1", "kind": "Eviction", "rust": "api::policy::v1::Eviction", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3584,6 +3684,7 @@ "version": "v1", "kind": "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", @@ -3608,6 +3709,7 @@ "version": "v1", "kind": "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", @@ -3632,6 +3734,7 @@ "version": "v1", "kind": "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", @@ -3656,6 +3759,7 @@ "version": "v1", "kind": "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", @@ -3681,6 +3785,7 @@ "version": "v1", "kind": "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", @@ -3709,6 +3814,7 @@ "version": "v1", "kind": "PodTemplate", "rust": "api::core::v1::PodTemplate", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3750,6 +3856,7 @@ "version": "v1", "kind": "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", @@ -3791,6 +3898,7 @@ "version": "v1", "kind": "Scale", "rust": "api::autoscaling::v1::Scale", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::autoscaling::v1::ScaleSpec", "status": "api::autoscaling::v1::ScaleStatus", "condition": null, @@ -3819,6 +3927,7 @@ "version": "v1", "kind": "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", @@ -3847,6 +3956,7 @@ "version": "v1", "kind": "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, @@ -3888,6 +3998,7 @@ "version": "v1", "kind": "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, @@ -3916,6 +4027,7 @@ "version": "v1", "kind": "Secret", "rust": "api::core::v1::Secret", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3957,6 +4069,7 @@ "version": "v1", "kind": "ServiceAccount", "rust": "api::core::v1::ServiceAccount", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, "condition": null, @@ -3998,6 +4111,7 @@ "version": "v1", "kind": "TokenRequest", "rust": "api::authentication::v1::TokenRequest", + "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::authentication::v1::TokenRequestSpec", "status": "api::authentication::v1::TokenRequestStatus", "condition": null, @@ -4022,6 +4136,7 @@ "version": "v1", "kind": "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", @@ -4061,6 +4176,7 @@ "version": "v1", "kind": "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", @@ -4086,6 +4202,7 @@ "version": "v1", "kind": "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", diff --git a/k8s-pb-codegen/openapi/list-resources.jq b/k8s-pb-codegen/openapi/list-resources.jq index 8d3980e..68de714 100644 --- a/k8s-pb-codegen/openapi/list-resources.jq +++ b/k8s-pb-codegen/openapi/list-resources.jq @@ -12,6 +12,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); # 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 @@ -19,6 +20,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); key: $gvks[0] | gvk_string, value: { rust: .key | to_rust, + metadata: $metadata, spec: $spec, status: $statusName | fmap(to_rust), condition: $condition, @@ -60,6 +62,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); version: $gvk.version, subresource: ($path | test("\\{name\\}/")), rust: $definition.rust, + metadata: $definition.metadata, spec: $definition.spec, status: $definition.status, condition: $definition.condition, @@ -81,6 +84,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); version: .[0].version, kind: .[0].kind, rust: .[0].rust, + metadata: .[0].metadata, spec: .[0].spec, status: .[0].status, condition: .[0].condition, From 6eeeb657d85441b3102fa7a392465fe8c9ffce07 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 01:46:31 -0700 Subject: [PATCH 4/8] Attach `subresources` to parent Signed-off-by: kazk --- k8s-pb-codegen/openapi/api-resources.json | 2219 ++++++++------------- k8s-pb-codegen/openapi/list-resources.jq | 17 + 2 files changed, 828 insertions(+), 1408 deletions(-) diff --git a/k8s-pb-codegen/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json index 234037c..81ec0dd 100644 --- a/k8s-pb-codegen/openapi/api-resources.json +++ b/k8s-pb-codegen/openapi/api-resources.json @@ -5,11 +5,11 @@ { "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, @@ -38,16 +38,17 @@ "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, @@ -76,7 +77,8 @@ "paths": [ "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations", "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" - ] + ], + "subresources": [] } ] }, @@ -86,11 +88,11 @@ { "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", @@ -119,35 +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", - "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": [ - "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" + ] + } ] } ] @@ -158,11 +146,11 @@ { "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", @@ -191,35 +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", - "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": [ - "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" + ] + } ] } ] @@ -230,11 +204,11 @@ { "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, @@ -267,16 +241,17 @@ "/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", @@ -309,45 +284,31 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::apps::v1::DaemonSetSpec", - "status": "api::apps::v1::DaemonSetStatus", - "condition": "api::apps::v1::DaemonSetCondition", - "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", @@ -380,74 +341,44 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::autoscaling::v1::ScaleSpec", - "status": "api::autoscaling::v1::ScaleStatus", - "condition": null, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::apps::v1::DeploymentSpec", - "status": "api::apps::v1::DeploymentStatus", - "condition": "api::apps::v1::DeploymentCondition", - "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", @@ -480,74 +411,44 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::autoscaling::v1::ScaleSpec", - "status": "api::autoscaling::v1::ScaleStatus", - "condition": null, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::apps::v1::ReplicaSetSpec", - "status": "api::apps::v1::ReplicaSetStatus", - "condition": "api::apps::v1::ReplicaSetCondition", - "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", @@ -580,64 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::autoscaling::v1::ScaleSpec", - "status": "api::autoscaling::v1::ScaleStatus", - "condition": null, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::apps::v1::StatefulSetSpec", - "status": "api::apps::v1::StatefulSetStatus", - "condition": "api::apps::v1::StatefulSetCondition", - "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" + ] + } ] } ] @@ -648,11 +519,11 @@ { "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", @@ -668,7 +539,8 @@ }, "paths": [ "/apis/authentication.k8s.io/v1/tokenreviews" - ] + ], + "subresources": [] } ] }, @@ -678,11 +550,11 @@ { "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", @@ -698,16 +570,17 @@ }, "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", @@ -723,16 +596,17 @@ }, "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", @@ -748,16 +622,17 @@ }, "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", @@ -773,7 +648,8 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/subjectaccessreviews" - ] + ], + "subresources": [] } ] }, @@ -783,11 +659,11 @@ { "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", @@ -820,59 +696,45 @@ "/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" + ] + } ] - }, + } + ] + }, + { + "apiGroupVersion": "autoscaling/v2beta1", + "resources": [ { - "name": "horizontalpodautoscalers/status", + "name": "horizontalpodautoscalers", "namespaced": true, - "subresource": true, - "apiGroupVersion": "autoscaling/v1", + "apiGroupVersion": "autoscaling/v2beta1", "group": "autoscaling", - "version": "v1", + "version": "v2beta1", "kind": "HorizontalPodAutoscaler", - "rust": "api::autoscaling::v1::HorizontalPodAutoscaler", + "proto": "api.autoscaling.v2beta1.HorizontalPodAutoscaler", + "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::autoscaling::v1::HorizontalPodAutoscalerSpec", - "status": "api::autoscaling::v1::HorizontalPodAutoscalerStatus", - "condition": null, + "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", + "status": "api::autoscaling::v2beta1::HorizontalPodAutoscalerStatus", + "condition": "api::autoscaling::v2beta1::HorizontalPodAutoscalerCondition", "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" - ] - } - ] - }, - { - "apiGroupVersion": "autoscaling/v2beta1", - "resources": [ - { - "name": "horizontalpodautoscalers", - "namespaced": true, - "subresource": false, - "apiGroupVersion": "autoscaling/v2beta1", - "group": "autoscaling", - "version": "v2beta1", - "kind": "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", - "deletecollection", + "create", + "delete", + "deletecollection", "get", "list", "patch", @@ -896,35 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", - "status": "api::autoscaling::v2beta1::HorizontalPodAutoscalerStatus", - "condition": "api::autoscaling::v2beta1::HorizontalPodAutoscalerCondition", - "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" + ] + } ] } ] @@ -935,11 +783,11 @@ { "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", @@ -972,35 +820,21 @@ "/apis/autoscaling/v2beta2/horizontalpodautoscalers", "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}" - ] - }, - { - "name": "horizontalpodautoscalers/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "autoscaling/v2beta2", - "group": "autoscaling", - "version": "v2beta2", - "kind": "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": [ - "get", - "patch", - "update" ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] } ] @@ -1011,11 +845,11 @@ { "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", @@ -1048,45 +882,31 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::batch::v1::CronJobSpec", - "status": "api::batch::v1::CronJobStatus", - "condition": null, - "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", @@ -1119,35 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::batch::v1::JobSpec", - "status": "api::batch::v1::JobStatus", - "condition": "api::batch::v1::JobCondition", - "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" + ] + } ] } ] @@ -1158,11 +964,11 @@ { "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", @@ -1195,35 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::batch::v1beta1::CronJobSpec", - "status": "api::batch::v1beta1::CronJobStatus", - "condition": null, - "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" + ] + } ] } ] @@ -1234,11 +1026,11 @@ { "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", @@ -1267,64 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::certificates::v1::CertificateSigningRequestSpec", - "status": "api::certificates::v1::CertificateSigningRequestStatus", - "condition": "api::certificates::v1::CertificateSigningRequestCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::certificates::v1::CertificateSigningRequestSpec", - "status": "api::certificates::v1::CertificateSigningRequestStatus", - "condition": "api::certificates::v1::CertificateSigningRequestCondition", - "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" + ] + } ] } ] @@ -1335,11 +1097,11 @@ { "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", @@ -1372,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": [] } ] }, @@ -1382,11 +1145,11 @@ { "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, @@ -1419,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": [] } ] }, @@ -1429,11 +1193,11 @@ { "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, @@ -1466,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": [] } ] }, @@ -1476,11 +1241,11 @@ { "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, @@ -1513,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": [] } ] }, @@ -1523,11 +1289,11 @@ { "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, @@ -1560,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": [] } ] }, @@ -1570,11 +1337,11 @@ { "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", @@ -1603,45 +1370,31 @@ "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::flowcontrol::v1beta1::FlowSchemaSpec", - "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", - "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", - "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", @@ -1670,50 +1423,36 @@ "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" + ] + } ] - }, + } + ] + }, + { + "apiGroupVersion": "internal.apiserver.k8s.io/v1alpha1", + "resources": [ { - "name": "prioritylevelconfigurations/status", + "name": "storageversions", "namespaced": false, - "subresource": true, - "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", - "group": "flowcontrol.apiserver.k8s.io", - "version": "v1beta1", - "kind": "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": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" - ] - } - ] - }, - { - "apiGroupVersion": "internal.apiserver.k8s.io/v1alpha1", - "resources": [ - { - "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", @@ -1742,35 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::apiserverinternal::v1alpha1::StorageVersionSpec", - "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", - "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", - "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" + ] + } ] } ] @@ -1781,11 +1506,11 @@ { "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", @@ -1814,16 +1539,17 @@ "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", @@ -1856,45 +1582,31 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::networking::v1::IngressSpec", - "status": "api::networking::v1::IngressStatus", - "condition": null, - "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", @@ -1927,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": [] } ] }, @@ -1937,11 +1650,11 @@ { "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, @@ -1970,7 +1683,8 @@ "paths": [ "/apis/node.k8s.io/v1/runtimeclasses", "/apis/node.k8s.io/v1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -1980,11 +1694,11 @@ { "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", @@ -2013,7 +1727,8 @@ "paths": [ "/apis/node.k8s.io/v1alpha1/runtimeclasses", "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2023,11 +1738,11 @@ { "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, @@ -2056,7 +1771,8 @@ "paths": [ "/apis/node.k8s.io/v1beta1/runtimeclasses", "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2066,11 +1782,11 @@ { "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", @@ -2103,35 +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", - "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": [ - "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" + ] + } ] } ] @@ -2142,11 +1844,11 @@ { "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", @@ -2179,45 +1881,31 @@ "/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", - "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": [ - "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", @@ -2246,7 +1934,8 @@ "paths": [ "/apis/policy/v1beta1/podsecuritypolicies", "/apis/policy/v1beta1/podsecuritypolicies/{name}" - ] + ], + "subresources": [] } ] }, @@ -2256,11 +1945,11 @@ { "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, @@ -2289,16 +1978,17 @@ "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, @@ -2327,16 +2017,17 @@ "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, @@ -2369,16 +2060,17 @@ "/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, @@ -2411,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": [] } ] }, @@ -2421,11 +2114,11 @@ { "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, @@ -2454,16 +2147,17 @@ "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, @@ -2492,16 +2186,17 @@ "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, @@ -2534,16 +2229,17 @@ "/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, @@ -2576,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": [] } ] }, @@ -2586,11 +2283,11 @@ { "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, @@ -2619,7 +2316,8 @@ "paths": [ "/apis/scheduling.k8s.io/v1/priorityclasses", "/apis/scheduling.k8s.io/v1/priorityclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2629,11 +2327,11 @@ { "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, @@ -2662,7 +2360,8 @@ "paths": [ "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2672,11 +2371,11 @@ { "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", @@ -2705,16 +2404,17 @@ "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", @@ -2743,16 +2443,17 @@ "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, @@ -2781,16 +2482,17 @@ "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", @@ -2819,35 +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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::storage::v1::VolumeAttachmentSpec", - "status": "api::storage::v1::VolumeAttachmentStatus", - "condition": null, - "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" + ] + } ] } ] @@ -2858,11 +2546,11 @@ { "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, @@ -2895,16 +2583,17 @@ "/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", @@ -2933,7 +2622,8 @@ "paths": [ "/apis/storage.k8s.io/v1alpha1/volumeattachments", "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" - ] + ], + "subresources": [] } ] }, @@ -2943,11 +2633,11 @@ { "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, @@ -2980,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": [] } ] }, @@ -2990,11 +2681,11 @@ { "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, @@ -3010,16 +2701,17 @@ }, "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, @@ -3038,16 +2730,17 @@ "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, @@ -3080,16 +2773,17 @@ "/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, @@ -3122,16 +2816,17 @@ "/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, @@ -3164,16 +2859,17 @@ "/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", @@ -3206,16 +2902,17 @@ "/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", @@ -3242,174 +2939,118 @@ "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" + ] + } ] }, { - "name": "namespaces/finalize", + "name": "nodes", "namespaced": false, - "subresource": true, "apiGroupVersion": "v1", "group": "", "version": "v1", - "kind": "Namespace", - "rust": "api::core::v1::Namespace", + "kind": "Node", + "proto": "api.core.v1.Node", + "rust": "api::core::v1::Node", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::NamespaceSpec", - "status": "api::core::v1::NamespaceStatus", - "condition": "api::core::v1::NamespaceCondition", + "spec": "api::core::v1::NodeSpec", + "status": "api::core::v1::NodeStatus", + "condition": "api::core::v1::NodeCondition", "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", "update" ], "scopedVerbs": { "all": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", "update" ] }, "paths": [ - "/api/v1/namespaces/{name}/finalize" + "/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" + ] + } ] }, { - "name": "namespaces/status", - "namespaced": false, - "subresource": true, + "name": "persistentvolumeclaims", + "namespaced": true, "apiGroupVersion": "v1", "group": "", "version": "v1", - "kind": "Namespace", - "rust": "api::core::v1::Namespace", + "kind": "PersistentVolumeClaim", + "proto": "api.core.v1.PersistentVolumeClaim", + "rust": "api::core::v1::PersistentVolumeClaim", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::NamespaceSpec", - "status": "api::core::v1::NamespaceStatus", - "condition": "api::core::v1::NamespaceCondition", + "spec": "api::core::v1::PersistentVolumeClaimSpec", + "status": "api::core::v1::PersistentVolumeClaimStatus", + "condition": "api::core::v1::PersistentVolumeClaimCondition", "verbs": [ + "create", + "delete", + "deletecollection", "get", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{name}/status" - ] - }, - { - "name": "nodes", - "namespaced": false, - "subresource": false, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "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", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::NodeSpec", - "status": "api::core::v1::NodeStatus", - "condition": "api::core::v1::NodeCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::NodeSpec", - "status": "api::core::v1::NodeStatus", - "condition": "api::core::v1::NodeCondition", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/nodes/{name}/status" - ] - }, - { - "name": "persistentvolumeclaims", - "namespaced": true, - "subresource": false, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "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", - "deletecollection", - "get", - "list", + "list", "patch", "update" ], @@ -3431,45 +3072,31 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PersistentVolumeClaimSpec", - "status": "api::core::v1::PersistentVolumeClaimStatus", - "condition": "api::core::v1::PersistentVolumeClaimCondition", - "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", @@ -3498,45 +3125,31 @@ "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PersistentVolumeSpec", - "status": "api::core::v1::PersistentVolumeStatus", - "condition": null, - "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", @@ -3569,250 +3182,122 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": null, - "status": null, - "condition": null, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": null, - "status": null, - "condition": null, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", - "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, @@ -3845,16 +3330,17 @@ "/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", @@ -3887,74 +3373,44 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::autoscaling::v1::ScaleSpec", - "status": "api::autoscaling::v1::ScaleStatus", - "condition": null, - "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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::ReplicationControllerSpec", - "status": "api::core::v1::ReplicationControllerStatus", - "condition": "api::core::v1::ReplicationControllerCondition", - "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", @@ -3987,45 +3443,31 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::ResourceQuotaSpec", - "status": "api::core::v1::ResourceQuotaStatus", - "condition": null, - "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, @@ -4058,16 +3500,17 @@ "/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, @@ -4100,41 +3543,29 @@ "/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", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::authentication::v1::TokenRequestSpec", - "status": "api::authentication::v1::TokenRequestStatus", - "condition": null, - "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", @@ -4165,61 +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", - "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": [ - "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", - "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": [ - "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/k8s-pb-codegen/openapi/list-resources.jq b/k8s-pb-codegen/openapi/list-resources.jq index 68de714..e1e9e30 100644 --- a/k8s-pb-codegen/openapi/list-resources.jq +++ b/k8s-pb-codegen/openapi/list-resources.jq @@ -19,6 +19,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); | { key: $gvks[0] | gvk_string, value: { + proto: .key | sub("^io\\.k8s\\."; "") | gsub("-"; "_"), rust: .key | to_rust, metadata: $metadata, spec: $spec, @@ -61,6 +62,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); group: $gvk.group, version: $gvk.version, subresource: ($path | test("\\{name\\}/")), + proto: $definition.proto, rust: $definition.rust, metadata: $definition.metadata, spec: $definition.spec, @@ -83,6 +85,7 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); group: .[0].group, version: .[0].version, kind: .[0].kind, + proto: .[0].proto, rust: .[0].rust, metadata: .[0].metadata, spec: .[0].spec, @@ -99,5 +102,19 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); ), 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) + ] ) }) From 4a106cede41ee206e9bfa8f816c7b7d4de6e2c03 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 02:35:49 -0700 Subject: [PATCH 5/8] Transform to map of proto path to resource infos Basically a copy of `list-resources.jq` without `verbs` as a map. Should be easier to use for codegen. Signed-off-by: kazk --- k8s-pb-codegen/openapi/transform.jq | 160 ++ k8s-pb-codegen/openapi/transformed.json | 2860 +++++++++++++++++++++++ 2 files changed, 3020 insertions(+) create mode 100644 k8s-pb-codegen/openapi/transform.jq create mode 100644 k8s-pb-codegen/openapi/transformed.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" + ] + } + ] + } +} From 77201d28fc6994f4d7ca9d078eea8ecbfba370e5 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 14:21:29 -0700 Subject: [PATCH 6/8] Load transformed JSON in codegen Signed-off-by: kazk --- justfile | 2 +- k8s-pb-codegen/src/lib.rs | 50 ++++++++++++++++++++++++++++++++++++++ k8s-pb-codegen/src/main.rs | 19 +++++++++++++-- 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 6346537..51398d8 100644 --- a/justfile +++ b/justfile @@ -56,7 +56,7 @@ swagger-transform: #!/usr/bin/env bash set -exuo pipefail cd k8s-pb-codegen/openapi - jq -f list-resources.jq < swagger.json > api-resources.json + jq -f transform.jq < swagger.json > transformed.json # Download and generate all swagger dependent files swagger: swagger-dl swagger-patch swagger-transform diff --git a/k8s-pb-codegen/src/lib.rs b/k8s-pb-codegen/src/lib.rs index e69de29..ceae17b 100644 --- a/k8s-pb-codegen/src/lib.rs +++ b/k8s-pb-codegen/src/lib.rs @@ -0,0 +1,50 @@ +#[derive(Clone, Debug, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Resource { + /// Name of the resource used in URL. + pub name: String, + /// True if the resource is namespaced. May still have `all` verbs like `list`. + pub namespaced: bool, + pub api_group_version: String, + pub group: String, + pub version: String, + pub kind: String, + /// Protobuf type path. + pub proto: String, + /// Rust type path. + pub rust: String, + /// Metadata type. + pub metadata: Option, + /// Spec type if any. + pub spec: Option, + /// Status type if any. + pub status: Option, + /// Condition type if the resource has `.status.conditions`. + pub condition: Option, + /// Verbs grouped by scope. `all` or `namespaced`. + pub scoped_verbs: ScopedVerbs, + /// All paths associated with this resource. + pub paths: Vec, + // TODO `Option>` + /// Any subresources. + pub subresources: Vec, +} + +#[derive(Clone, Debug, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ScopedVerbs { + pub all: Option>, + /// Namespaced actions. + pub namespaced: Option>, +} + +#[derive(Clone, Debug, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Subresource { + /// Name of the subresouce used in URL. + pub name: String, + /// Verbs grouped by scope. `all` or `namespaced`. + pub scoped_verbs: ScopedVerbs, + /// All paths associated with this subresource. + pub paths: Vec, +} diff --git a/k8s-pb-codegen/src/main.rs b/k8s-pb-codegen/src/main.rs index a58aff7..161fb9a 100644 --- a/k8s-pb-codegen/src/main.rs +++ b/k8s-pb-codegen/src/main.rs @@ -3,7 +3,9 @@ use prost_types::FileDescriptorSet; #[macro_use] extern crate log; use anyhow::{Context, Result}; -use std::{fs, path::Path}; +use std::{collections::HashMap, fs, path::Path}; + +use k8s_pb_codegen::Resource; fn read_file>(path: P) -> Result { fs::read_to_string(&path).with_context(|| format!("read {}", path.as_ref().display())) @@ -26,6 +28,11 @@ fn main() -> Result<()> { .out_dir("./out") .compile_protos(protos.as_slice(), &["protos/"])?; + info!("loading json"); + let apif: String = read_file(root.join("openapi/transformed.json"))?; + let resources: HashMap = + serde_json::from_str(&apif).with_context(|| "parse transformed.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 @@ -34,7 +41,15 @@ fn main() -> Result<()> { // 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 { - info!("generating {}", pkg); + for m in f.message_type { + if let Some(name) = m.name { + let path = format!("{}.{}", pkg, name); + if let Some(resource) = resources.get(&path) { + info!("generating resource {}", path); + debug!("{:?}", resource); + } + } + } } } From 48621f331d3c18fe6eaf18826524c74e1bca1fc3 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 14:55:37 -0700 Subject: [PATCH 7/8] Add a note about ignoring `/watch/` paths Signed-off-by: kazk --- k8s-pb-codegen/openapi/transform.jq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k8s-pb-codegen/openapi/transform.jq b/k8s-pb-codegen/openapi/transform.jq index 7eac8e1..214eeaf 100644 --- a/k8s-pb-codegen/openapi/transform.jq +++ b/k8s-pb-codegen/openapi/transform.jq @@ -48,9 +48,9 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); .key as $path | .value | to_entries[] | - # Only process path infos with GVK (methods) and ignore deprecated. + # Only process path infos with GVK (methods) and ignore deprecated `/watch/` paths that doesn't fit the pattern. .value["x-kubernetes-group-version-kind"]? as $gvk | - select($gvk != null and (.value.description | test("deprecated: "; "i") | not)) | + select($gvk != null and (.value.description | test("deprecated: use the 'watch'"; "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`. ( From 98de653c1b966dfe088ec62dc4ed49ed0bc53463 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 15:09:24 -0700 Subject: [PATCH 8/8] Remove old jq scripts Signed-off-by: kazk --- README.md | 121 - k8s-pb-codegen/openapi/api-resources.json | 3630 --------------------- k8s-pb-codegen/openapi/list-paths.jq | 33 - k8s-pb-codegen/openapi/list-resources.jq | 120 - 4 files changed, 3904 deletions(-) delete mode 100644 k8s-pb-codegen/openapi/api-resources.json delete mode 100644 k8s-pb-codegen/openapi/list-paths.jq delete mode 100644 k8s-pb-codegen/openapi/list-resources.jq diff --git a/README.md b/README.md index 7911567..cdd06a0 100644 --- a/README.md +++ b/README.md @@ -57,124 +57,3 @@ We should be able to find the following: - Namespaced if any possible path contains `/namespaces/{namespace}/` - May also have paths for all namespaces for some verbs (e.g., `list` all pods) - Subresource if path contains `/{name}/` (`/` after `{name}`) - -### Transforming - -Transform `swagger.json` to something easier to explore. - -#### Like APIResourceList - -```bash -cat swagger.json \ -| jq -f list-resources.jq \ -> api-resources.json -``` - -```bash -cat swagger.json | jq -f list-resources.jq | jq '.[0]' -``` - -```json -{ - "apiGroupVersion": "admissionregistration.k8s.io/v1", - "resources": [ - { - "name": "mutatingwebhookconfigurations", - "namespaced": false, - "apiGroupVersion": "admissionregistration.k8s.io/v1", - "group": "admissionregistration.k8s.io", - "version": "v1", - "kind": "MutatingWebhookConfiguration", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - { - "name": "validatingwebhookconfigurations", - "namespaced": false, - "apiGroupVersion": "admissionregistration.k8s.io/v1", - "group": "admissionregistration.k8s.io", - "version": "v1", - "kind": "ValidatingWebhookConfiguration", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - } - ] -} -``` - -#### Paths - -```typescript -type ResourcePath = { - // Request path. - path: string; - // `x-kubernetes-action` or `method`. - verb: string; - // Group and version of API. Can be different from `group` and `version` for subresources. - apiGroupVersion: string; - // GVK - group: string; - version: string; - kind: string; - // True if the path contains `/namespaces/{namespace}/` - namespaced: boolean; - // True if the path contains a segment after `{name}`. - subresource: boolean; - // MIME types of supported content types. Comma separated. - consumes: string; - // MIME types of supported responses. Comma separated. - produces: string; - // Plural name. Includes subresources like APIResourceList. - name: string; -}; -``` - -```bash -cat swagger.json | jq -f list-paths.jq -``` - -```bash -cat swagger.json \ -| jq -f list-paths.jq \ -| jq 'map(select(.kind == "Pod" and .verb == "get" and .subresource == false))' -``` - -```json -[ - { - "path": "/api/v1/namespaces/{namespace}/pods/{name}", - "verb": "get", - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "namespaced": true, - "subresource": false, - "consumes": "*/*", - "produces": "application/json, application/yaml, application/vnd.kubernetes.protobuf", - "name": "pods" - } -] -``` - -Group by `name`: - -```bash -cat swagger.json \ -| jq -f list-paths.jq \ -| jq 'group_by(.name)' -``` diff --git a/k8s-pb-codegen/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json deleted file mode 100644 index 81ec0dd..0000000 --- a/k8s-pb-codegen/openapi/api-resources.json +++ /dev/null @@ -1,3630 +0,0 @@ -[ - { - "apiGroupVersion": "admissionregistration.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations", - "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations", - "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "apiextensions.k8s.io/v1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "apiregistration.k8s.io/v1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "apps/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "authentication.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create" - ], - "scopedVerbs": { - "all": [ - "create" - ] - }, - "paths": [ - "/apis/authentication.k8s.io/v1/tokenreviews" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "authorization.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create" - ], - "scopedVerbs": { - "namespaced": [ - "create" - ] - }, - "paths": [ - "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create" - ], - "scopedVerbs": { - "all": [ - "create" - ] - }, - "paths": [ - "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create" - ], - "scopedVerbs": { - "all": [ - "create" - ] - }, - "paths": [ - "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create" - ], - "scopedVerbs": { - "all": [ - "create" - ] - }, - "paths": [ - "/apis/authorization.k8s.io/v1/subjectaccessreviews" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "autoscaling/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "autoscaling/v2beta1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "autoscaling/v2beta2", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "batch/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "batch/v1beta1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "certificates.k8s.io/v1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "coordination.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "discovery.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "discovery.k8s.io/v1beta1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "events.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "events.k8s.io/v1beta1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "internal.apiserver.k8s.io/v1alpha1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "networking.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/networking.k8s.io/v1/ingressclasses", - "/apis/networking.k8s.io/v1/ingressclasses/{name}" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "node.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/node.k8s.io/v1/runtimeclasses", - "/apis/node.k8s.io/v1/runtimeclasses/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "node.k8s.io/v1alpha1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/node.k8s.io/v1alpha1/runtimeclasses", - "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "node.k8s.io/v1beta1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/node.k8s.io/v1beta1/runtimeclasses", - "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "policy/v1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "policy/v1beta1", - "resources": [ - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/policy/v1beta1/podsecuritypolicies", - "/apis/policy/v1beta1/podsecuritypolicies/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "rbac.authorization.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "rbac.authorization.k8s.io/v1alpha1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "scheduling.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/scheduling.k8s.io/v1/priorityclasses", - "/apis/scheduling.k8s.io/v1/priorityclasses/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "scheduling.k8s.io/v1alpha1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", - "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "storage.k8s.io/v1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/storage.k8s.io/v1/csidrivers", - "/apis/storage.k8s.io/v1/csidrivers/{name}" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/storage.k8s.io/v1/csinodes", - "/apis/storage.k8s.io/v1/csinodes/{name}" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/storage.k8s.io/v1/storageclasses", - "/apis/storage.k8s.io/v1/storageclasses/{name}" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - }, - { - "apiGroupVersion": "storage.k8s.io/v1alpha1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ] - }, - "paths": [ - "/apis/storage.k8s.io/v1alpha1/volumeattachments", - "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" - ], - "subresources": [] - } - ] - }, - { - "apiGroupVersion": "storage.k8s.io/v1beta1", - "resources": [ - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - } - ] - }, - { - "apiGroupVersion": "v1", - "resources": [ - { - "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, - "verbs": [ - "create" - ], - "scopedVerbs": { - "namespaced": [ - "create" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/bindings" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "get", - "list" - ], - "scopedVerbs": { - "all": [ - "get", - "list" - ] - }, - "paths": [ - "/api/v1/componentstatuses", - "/api/v1/componentstatuses/{name}" - ], - "subresources": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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", - "verbs": [ - "create", - "delete", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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": [] - }, - { - "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, - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - }, - { - "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", - "verbs": [ - "create", - "delete", - "get", - "list", - "patch", - "update" - ], - "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" - ] - } - ] - } - ] - } -] diff --git a/k8s-pb-codegen/openapi/list-paths.jq b/k8s-pb-codegen/openapi/list-paths.jq deleted file mode 100644 index 00009eb..0000000 --- a/k8s-pb-codegen/openapi/list-paths.jq +++ /dev/null @@ -1,33 +0,0 @@ -[ - .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)) - # Keep group and version from path because subresource's GVK might be different. e.g., `autoscale/v1` subresource 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 - | { - path: $path, - verb: (if $verb == "post" then "create" elif $verb == "put" then "update" else $verb end), - apiGroupVersion: $apiGroupVersion, - group: $gvk.group, - version: $gvk.version, - kind: $gvk.kind, - namespaced: ($path | test("/namespaces/\\{namespace\\}/")), - subresource: ($path | test("\\{name\\}/")), - consumes: (.value.consumes? // ["*/*"] | join(", ")), - produces: (.value.produces? // ["*/*"] | join(", ")), - # Plural name. Includes a subresource name like in `APIResourceList`. - name: ( - $path - | sub("^/apis?/\($apiGroupVersion)/(?:namespaces/\\{namespace\\}/)?"; "") - | split("/") - | map(select(. | (startswith("{") | not))) - | join("/") - ), - } -] diff --git a/k8s-pb-codegen/openapi/list-resources.jq b/k8s-pb-codegen/openapi/list-resources.jq deleted file mode 100644 index e1e9e30..0000000 --- a/k8s-pb-codegen/openapi/list-resources.jq +++ /dev/null @@ -1,120 +0,0 @@ -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. - | .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: ( - $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_by(.apiGroupVersion) -| map({ - apiGroupVersion: .[0].apiGroupVersion, - resources: ( - group_by(.name) - | map({ - name: .[0].name, - # Some resources can be both namespaced and cluster scoped. - 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, - verbs: (map(.verb) | unique), - 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 - | .[] - | 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) - ] - ) -})