From d121f443d99e52ef9714d25de6031d8dee8bbc2e Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 22 Aug 2021 13:06:50 +0100 Subject: [PATCH 01/16] add a service generator for build.rs sanity also moves generated protos list into an input file that i've called protos.list for now. Signed-off-by: clux --- README.md | 14 ++---- build.rs | 124 +++++++++++++++++++++++----------------------------- protos.list | 62 ++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 79 deletions(-) create mode 100644 protos.list diff --git a/README.md b/README.md index dd39bc8..df2b4c8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Get protos by extracting them from Kubernetes releases: # In `protos/` VERSION=1.22.0 for x in api apimachinery apiextensions-apiserver kube-aggregator metrics; do - mkdir ./$x; + 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; @@ -35,16 +35,10 @@ rmdir protos/k8s.io/ ``` ### Generate - -Collect all paths to generate: - -```bash -# In project root. -fd -e proto -x echo '"{}",' | sort -``` -Copy the output to `build.rs`, then: +Refresh input paths to generate, then build: ```bash +fd -e proto | sort > protos.list cargo build ``` @@ -115,7 +109,7 @@ Fix path operation annotated with a `x-kubernetes-group-version-kind` that refer gron swagger.json \ | perl -pe 's/(?<=kind = ")(Pod|Node|Service)(?:Attach|Exec|PortForward|Proxy)Options(?=")/$1/' \ | gron -u \ -> swagger-patched.json +> swagger-patched.json mv swagger-patched.json swagger.json ``` diff --git a/build.rs b/build.rs index 641ea31..1350d7a 100644 --- a/build.rs +++ b/build.rs @@ -1,73 +1,59 @@ -use std::io::Result; +use std::cell::RefCell; +use std::rc::Rc; + +#[derive(Default)] +struct GeneratorState { + service_names: Vec, + package_names: Vec, + finalized: usize, +} + +struct KubeGenerator { + data: String, + state: Rc>, +} +impl KubeGenerator { + fn new(state: Rc>) -> Self { + let data = std::fs::read_to_string("./openapi/api-resources.json").unwrap(); + Self { data, state } + } +} + +impl prost_build::ServiceGenerator for KubeGenerator { + fn generate(&mut self, service: prost_build::Service, _buf: &mut String) { + let mut state = self.state.borrow_mut(); + state.service_names.push(service.name); + } + + fn finalize(&mut self, _buf: &mut String) { + let mut state = self.state.borrow_mut(); + state.finalized += 1; + } + + fn finalize_package(&mut self, package: &str, buf: &mut String) { + let mut state = self.state.borrow_mut(); + state.package_names.push(package.to_string()); + // TODO: generate generics for pkg here using self.data + let pkg_generics = format!("// blahtest"); + buf.push_str(&pkg_generics); + } +} + +fn main() -> std::io::Result<()> { + let protos: Vec<&str> = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/protos.list")) + .lines() + .collect(); + + let state = Rc::new(RefCell::new(GeneratorState::default())); + prost_build::Config::new() + .service_generator(Box::new(KubeGenerator::new(Rc::clone(&state)))) + .compile_protos(protos.as_slice(), &["protos/"])?; + + // sanity + let state = state.borrow(); + //assert_eq!(state.service_names.len(), protos.len()); zero atm.. + assert_eq!(state.finalized, protos.len()); -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/protos.list b/protos.list new file mode 100644 index 0000000..e511044 --- /dev/null +++ b/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 From 9a31740dd4dc3f3b4faeaef4f18568a5161e5dba Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 22 Aug 2021 16:15:39 +0100 Subject: [PATCH 02/16] move scripts into something that tracks script dependencies trying just here as well because we are already doing cool stuff with sd and gron. Signed-off-by: clux --- README.md | 62 ++++++++++++++----------------------------------------- justfile | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 47 deletions(-) create mode 100644 justfile diff --git a/README.md b/README.md index df2b4c8..6ddb80a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ Experimenting with Kubernetes protobufs. -## Protobufs +## Build Dependencies -### Download +- [gron](https://github.com/tomnomnom/gron) +- [just](https://github.com/casey/just) +- [sd](https://github.com/chmln/sd) +- [jq](https://stedolan.github.io/jq/) -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,33 +16,19 @@ 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 -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 -``` +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 -Refresh input paths to generate, then build: +## Building +With all dependent `swagger` and `protos` files built, run: ```bash -fd -e proto | sort > protos.list cargo build ``` @@ -68,7 +58,7 @@ See [`prost_build`](https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a3 [`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. @@ -91,28 +81,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/justfile b/justfile new file mode 100644 index 0000000..31d5bba --- /dev/null +++ b/justfile @@ -0,0 +1,62 @@ +VERSION := "1.22.0" + +default: + @just --list + +# Download protos schemas from upstream +protos-dl: + #!/usr/bin/env bash + set -exuo pipefail + rm -rf protos && mkdir protos && cd protos + for x in api apimachinery apiextensions-apiserver kube-aggregator metrics; do + mkdir ./$x -p + curl -sSL https://github.com/kubernetes/$x/archive/refs/tags/kubernetes-{{VERSION}}.tar.gz | tar xzf - -C ./$x/ --strip-components=1 + fd -e proto -x sh -c "mkdir -p k8s.io/'{//}'; mv '{}' k8s.io/'{}'" ';' . ./$x + rm -rf ./$x + done + +# Patch protos schemas to fix import paths +protos-patch: + #!/usr/bin/env bash + set -exuo pipefail + fd -e proto -x sd 'k8s\.io\.(.+);' '$1;' {} + fd -e proto -x sd 'import "k8s\.io/(.+)";' 'import "$1";' {} + mv protos/k8s.io/* protos/ + rmdir protos/k8s.io/ + +# Generate protos path list for prost +protos-list: + fd -e proto | sort > protos.list + +# Download and generate all protos dependent files +protos: protos-dl protos-patch protos-list + +# Download swagger +swagger-dl: + #!/usr/bin/env bash + set -exuo pipefail + curl -sSL -o 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 openapi + # 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 + 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 + +# Transform swagger schema into api-resources.json +swagger-transform: + #!/usr/bin/env bash + set -exuo pipefail + cd 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 From 80289eb2bdf7bcced73c8e280bd4a56b598eb4c8 Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 22 Aug 2021 17:46:50 +0100 Subject: [PATCH 03/16] attempts to make servicegenerator work Signed-off-by: clux --- README.md | 6 ++---- build.rs | 24 ++++++++++++------------ justfile | 7 +++++++ 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6ddb80a..af704d8 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,9 @@ Results of this step is committed already. But to run, invoke `just swagger`. ## Building -With all dependent `swagger` and `protos` files built, run: +To build the [out](./out) directory from [build.rs](./build.rs) using swagger and protobuf results run `just build`. -```bash -cargo build -``` +Results of this step is committed already. ### Hack diff --git a/build.rs b/build.rs index 1350d7a..e9ef03c 100644 --- a/build.rs +++ b/build.rs @@ -4,8 +4,8 @@ use std::rc::Rc; #[derive(Default)] struct GeneratorState { service_names: Vec, - package_names: Vec, finalized: usize, + generated: usize } struct KubeGenerator { @@ -20,22 +20,21 @@ impl KubeGenerator { } impl prost_build::ServiceGenerator for KubeGenerator { - fn generate(&mut self, service: prost_build::Service, _buf: &mut String) { + fn generate(&mut self, service: prost_build::Service, buf: &mut String) { let mut state = self.state.borrow_mut(); state.service_names.push(service.name); + state.generated += 1; + // TODO: THIS doesn't work? never called by prost_build, bug? + let generics = format!("// TODO: generate\n"); + buf.push_str(&generics); } - fn finalize(&mut self, _buf: &mut String) { + fn finalize(&mut self, buf: &mut String) { let mut state = self.state.borrow_mut(); state.finalized += 1; - } - - fn finalize_package(&mut self, package: &str, buf: &mut String) { - let mut state = self.state.borrow_mut(); - state.package_names.push(package.to_string()); - // TODO: generate generics for pkg here using self.data - let pkg_generics = format!("// blahtest"); - buf.push_str(&pkg_generics); + // NB: THIS works, but we need a name here before it's useful + //let generics = format!("// TODO: finalize\n"); + //buf.push_str(&generics); } } @@ -47,12 +46,13 @@ fn main() -> std::io::Result<()> { let state = Rc::new(RefCell::new(GeneratorState::default())); prost_build::Config::new() .service_generator(Box::new(KubeGenerator::new(Rc::clone(&state)))) + .out_dir("./out") .compile_protos(protos.as_slice(), &["protos/"])?; // sanity let state = state.borrow(); - //assert_eq!(state.service_names.len(), protos.len()); zero atm.. assert_eq!(state.finalized, protos.len()); + assert_eq!(state.generated, protos.len()); // TODO: why does generate not trigger // 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. diff --git a/justfile b/justfile index 31d5bba..2dd5bba 100644 --- a/justfile +++ b/justfile @@ -60,3 +60,10 @@ swagger-transform: # Download and generate all swagger dependent files swagger: swagger-dl swagger-patch swagger-transform + +# Generate the library code from completed swagger and protos +build: + #!/usr/bin/env bash + set -exuo pipefail + rm -rf out/ && mkdir out + cargo build From 1350ff7685cec6a0d15c678a6d08aab48aecfcfa Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 22 Aug 2021 23:03:59 +0100 Subject: [PATCH 04/16] drop servicegenerater and use fds to inject into files Signed-off-by: clux --- .gitignore | 1 + Cargo.toml | 3 +- README.md | 27 +------- build.rs | 69 ++++++------------- justfile | 14 +++- out/api.admission.v1.rs | 1 + out/api.admission.v1beta1.rs | 1 + out/api.admissionregistration.v1.rs | 1 + out/api.admissionregistration.v1beta1.rs | 1 + out/api.apiserverinternal.v1alpha1.rs | 1 + out/api.apps.v1.rs | 1 + out/api.apps.v1beta1.rs | 1 + out/api.apps.v1beta2.rs | 1 + out/api.authentication.v1.rs | 1 + out/api.authentication.v1beta1.rs | 1 + out/api.authorization.v1.rs | 1 + out/api.authorization.v1beta1.rs | 1 + out/api.autoscaling.v1.rs | 1 + out/api.autoscaling.v2beta1.rs | 1 + out/api.autoscaling.v2beta2.rs | 1 + out/api.batch.v1.rs | 1 + out/api.batch.v1beta1.rs | 1 + out/api.certificates.v1.rs | 1 + out/api.certificates.v1beta1.rs | 1 + out/api.coordination.v1.rs | 1 + out/api.coordination.v1beta1.rs | 1 + out/api.core.v1.rs | 1 + out/api.discovery.v1.rs | 1 + out/api.discovery.v1beta1.rs | 1 + out/api.events.v1.rs | 1 + out/api.events.v1beta1.rs | 1 + out/api.extensions.v1beta1.rs | 1 + out/api.flowcontrol.v1alpha1.rs | 1 + out/api.flowcontrol.v1beta1.rs | 1 + out/api.imagepolicy.v1alpha1.rs | 1 + out/api.networking.v1.rs | 1 + out/api.networking.v1beta1.rs | 1 + out/api.node.v1.rs | 1 + out/api.node.v1alpha1.rs | 1 + out/api.node.v1beta1.rs | 1 + out/api.policy.v1.rs | 1 + out/api.policy.v1beta1.rs | 1 + out/api.rbac.v1.rs | 1 + out/api.rbac.v1alpha1.rs | 1 + out/api.rbac.v1beta1.rs | 1 + out/api.scheduling.v1.rs | 1 + out/api.scheduling.v1alpha1.rs | 1 + out/api.scheduling.v1beta1.rs | 1 + out/api.storage.v1.rs | 1 + out/api.storage.v1alpha1.rs | 1 + out/api.storage.v1beta1.rs | 1 + ...ons_apiserver.pkg.apis.apiextensions.v1.rs | 1 + ...piserver.pkg.apis.apiextensions.v1beta1.rs | 1 + out/apimachinery.pkg.api.resource.rs | 1 + out/apimachinery.pkg.apis.meta.v1.rs | 1 + out/apimachinery.pkg.apis.meta.v1beta1.rs | 1 + out/apimachinery.pkg.apis.testapigroup.v1.rs | 1 + out/apimachinery.pkg.runtime.rs | 1 + out/apimachinery.pkg.runtime.schema.rs | 1 + out/apimachinery.pkg.util.intstr.rs | 1 + ..._aggregator.pkg.apis.apiregistration.v1.rs | 1 + ...egator.pkg.apis.apiregistration.v1beta1.rs | 1 + ...metrics.pkg.apis.custom_metrics.v1beta1.rs | 1 + ...metrics.pkg.apis.custom_metrics.v1beta2.rs | 1 + ...trics.pkg.apis.external_metrics.v1beta1.rs | 1 + out/metrics.pkg.apis.metrics.v1alpha1.rs | 1 + out/metrics.pkg.apis.metrics.v1beta1.rs | 1 + 67 files changed, 103 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index 96ef6c0..09b2d47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target Cargo.lock +protos.fds diff --git a/Cargo.toml b/Cargo.toml index b914b87..82f5529 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,8 @@ edition = "2018" [dependencies] bytes = "1.0.1" prost = "0.8.0" -prost-types = "0.8" [build-dependencies] prost-build = "0.8.0" +prost-types = "0.8.0" +prost = "0.8.0" diff --git a/README.md b/README.md index af704d8..34699a6 100644 --- a/README.md +++ b/README.md @@ -26,34 +26,13 @@ Results of this step is committed already. But to run, invoke `just swagger`. ## Building -To build the [out](./out) directory from [build.rs](./build.rs) using swagger and protobuf results run `just build`. +To build the [out](./out) directory from [build.rs](./build.rs) we will use the outputs from the `swagger`, `protobuf`, and `protobuf-fds` targets. -Results of this step is committed already. +Results of this step is committed already. But to run, invoke `just build` ### Hack -Generate a [`FileDescriptorSet`] containing all of the input files: - -```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 +Generate a [`FileDescriptorSet`] containing all of the input files wih `just build-fds` ## OpenAPI Strategy diff --git a/build.rs b/build.rs index e9ef03c..412ecbd 100644 --- a/build.rs +++ b/build.rs @@ -1,58 +1,33 @@ -use std::cell::RefCell; -use std::rc::Rc; - -#[derive(Default)] -struct GeneratorState { - service_names: Vec, - finalized: usize, - generated: usize -} - -struct KubeGenerator { - data: String, - state: Rc>, -} -impl KubeGenerator { - fn new(state: Rc>) -> Self { - let data = std::fs::read_to_string("./openapi/api-resources.json").unwrap(); - Self { data, state } - } -} - -impl prost_build::ServiceGenerator for KubeGenerator { - fn generate(&mut self, service: prost_build::Service, buf: &mut String) { - let mut state = self.state.borrow_mut(); - state.service_names.push(service.name); - state.generated += 1; - // TODO: THIS doesn't work? never called by prost_build, bug? - let generics = format!("// TODO: generate\n"); - buf.push_str(&generics); - } - - fn finalize(&mut self, buf: &mut String) { - let mut state = self.state.borrow_mut(); - state.finalized += 1; - // NB: THIS works, but we need a name here before it's useful - //let generics = format!("// TODO: finalize\n"); - //buf.push_str(&generics); - } -} +use prost_types::{FileDescriptorProto, FileDescriptorSet}; +use prost::Message; fn main() -> std::io::Result<()> { - let protos: Vec<&str> = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/protos.list")) + let protos = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/protos.list")) .lines() - .collect(); + .collect::>(); - let state = Rc::new(RefCell::new(GeneratorState::default())); prost_build::Config::new() - .service_generator(Box::new(KubeGenerator::new(Rc::clone(&state)))) + // should probably switch to this + //.btree_map(&["."]) .out_dir("./out") .compile_protos(protos.as_slice(), &["protos/"])?; - // sanity - let state = state.borrow(); - assert_eq!(state.finalized, protos.len()); - assert_eq!(state.generated, protos.len()); // TODO: why does generate not trigger + let apis = std::fs::read_to_string("./openapi/api-resources.json")?; + + let buf = std::fs::read("./protos.fds").unwrap(); + 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 { + use std::io::Write; + if let Some(pkg) = f.package { + let pkgpath = std::path::Path::new("./out").join(format!("{}.rs", pkg)); + let generics = format!("// TODO genericsfor {}\n", pkg); + let mut file = std::fs::OpenOptions::new().write(true).append(true).open(&pkgpath)?; + file.write(generics.as_bytes())?; + } + } // Generate code in `src/` by reading files in `OUT_DIR`? // Need to create `mod.rs` file for each level based on the filename, and write generated code in correct file. diff --git a/justfile b/justfile index 2dd5bba..692b2f9 100644 --- a/justfile +++ b/justfile @@ -61,8 +61,20 @@ swagger-transform: # Download and generate all swagger dependent files swagger: swagger-dl swagger-patch swagger-transform +# Build a FileDescriptorSet for custom code generation +build-fds: + #!/usr/bin/env bash + set -exuo pipefail + shopt -s globstar + 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 -build: +build: build-fds #!/usr/bin/env bash set -exuo pipefail rm -rf out/ && mkdir out diff --git a/out/api.admission.v1.rs b/out/api.admission.v1.rs index 8f85492..c0c727c 100644 --- a/out/api.admission.v1.rs +++ b/out/api.admission.v1.rs @@ -137,3 +137,4 @@ pub struct AdmissionReview { #[prost(message, optional, tag="2")] pub response: ::core::option::Option, } +// TODO genericsfor api.admission.v1 diff --git a/out/api.admission.v1beta1.rs b/out/api.admission.v1beta1.rs index f01a490..c3aecdf 100644 --- a/out/api.admission.v1beta1.rs +++ b/out/api.admission.v1beta1.rs @@ -137,3 +137,4 @@ pub struct AdmissionReview { #[prost(message, optional, tag="2")] pub response: ::core::option::Option, } +// TODO genericsfor api.admission.v1beta1 diff --git a/out/api.admissionregistration.v1.rs b/out/api.admissionregistration.v1.rs index dc3c146..78b5473 100644 --- a/out/api.admissionregistration.v1.rs +++ b/out/api.admissionregistration.v1.rs @@ -457,3 +457,4 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } +// TODO genericsfor api.admissionregistration.v1 diff --git a/out/api.admissionregistration.v1beta1.rs b/out/api.admissionregistration.v1beta1.rs index 8ca0b5d..7261bc7 100644 --- a/out/api.admissionregistration.v1beta1.rs +++ b/out/api.admissionregistration.v1beta1.rs @@ -465,3 +465,4 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } +// TODO genericsfor api.admissionregistration.v1beta1 diff --git a/out/api.apiserverinternal.v1alpha1.rs b/out/api.apiserverinternal.v1alpha1.rs index 6617ffc..ce33feb 100644 --- a/out/api.apiserverinternal.v1alpha1.rs +++ b/out/api.apiserverinternal.v1alpha1.rs @@ -97,3 +97,4 @@ pub struct StorageVersionStatus { #[prost(message, repeated, tag="3")] pub conditions: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.apiserverinternal.v1alpha1 diff --git a/out/api.apps.v1.rs b/out/api.apps.v1.rs index 0859778..f6028ff 100644 --- a/out/api.apps.v1.rs +++ b/out/api.apps.v1.rs @@ -737,3 +737,4 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } +// TODO genericsfor api.apps.v1 diff --git a/out/api.apps.v1beta1.rs b/out/api.apps.v1beta1.rs index 696e470..8e61a36 100644 --- a/out/api.apps.v1beta1.rs +++ b/out/api.apps.v1beta1.rs @@ -484,3 +484,4 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } +// TODO genericsfor api.apps.v1beta1 diff --git a/out/api.apps.v1beta2.rs b/out/api.apps.v1beta2.rs index e0c0ae0..5d9f05a 100644 --- a/out/api.apps.v1beta2.rs +++ b/out/api.apps.v1beta2.rs @@ -785,3 +785,4 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } +// TODO genericsfor api.apps.v1beta2 diff --git a/out/api.authentication.v1.rs b/out/api.authentication.v1.rs index 954c17f..2026bb1 100644 --- a/out/api.authentication.v1.rs +++ b/out/api.authentication.v1.rs @@ -165,3 +165,4 @@ pub struct UserInfo { #[prost(map="string, message", tag="4")] pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ExtraValue>, } +// TODO genericsfor api.authentication.v1 diff --git a/out/api.authentication.v1beta1.rs b/out/api.authentication.v1beta1.rs index 570b970..f981262 100644 --- a/out/api.authentication.v1beta1.rs +++ b/out/api.authentication.v1beta1.rs @@ -93,3 +93,4 @@ pub struct UserInfo { #[prost(map="string, message", tag="4")] pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ExtraValue>, } +// TODO genericsfor api.authentication.v1beta1 diff --git a/out/api.authorization.v1.rs b/out/api.authorization.v1.rs index e349d9a..631ba1a 100644 --- a/out/api.authorization.v1.rs +++ b/out/api.authorization.v1.rs @@ -263,3 +263,4 @@ pub struct SubjectRulesReviewStatus { #[prost(string, optional, tag="4")] pub evaluation_error: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.authorization.v1 diff --git a/out/api.authorization.v1beta1.rs b/out/api.authorization.v1beta1.rs index e86ebf7..fdace60 100644 --- a/out/api.authorization.v1beta1.rs +++ b/out/api.authorization.v1beta1.rs @@ -263,3 +263,4 @@ pub struct SubjectRulesReviewStatus { #[prost(string, optional, tag="4")] pub evaluation_error: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.authorization.v1beta1 diff --git a/out/api.autoscaling.v1.rs b/out/api.autoscaling.v1.rs index f6d3832..bddf130 100644 --- a/out/api.autoscaling.v1.rs +++ b/out/api.autoscaling.v1.rs @@ -482,3 +482,4 @@ pub struct ScaleStatus { #[prost(string, optional, tag="2")] pub selector: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.autoscaling.v1 diff --git a/out/api.autoscaling.v2beta1.rs b/out/api.autoscaling.v2beta1.rs index c0381c0..6f3ed28 100644 --- a/out/api.autoscaling.v2beta1.rs +++ b/out/api.autoscaling.v2beta1.rs @@ -459,3 +459,4 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="3")] pub current_average_value: ::core::option::Option, } +// TODO genericsfor api.autoscaling.v2beta1 diff --git a/out/api.autoscaling.v2beta2.rs b/out/api.autoscaling.v2beta2.rs index 73fa247..12d47b1 100644 --- a/out/api.autoscaling.v2beta2.rs +++ b/out/api.autoscaling.v2beta2.rs @@ -483,3 +483,4 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="2")] pub current: ::core::option::Option, } +// TODO genericsfor api.autoscaling.v2beta2 diff --git a/out/api.batch.v1.rs b/out/api.batch.v1.rs index 63bdf03..ec3141c 100644 --- a/out/api.batch.v1.rs +++ b/out/api.batch.v1.rs @@ -348,3 +348,4 @@ pub struct UncountedTerminatedPods { #[prost(string, repeated, tag="2")] pub failed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +// TODO genericsfor api.batch.v1 diff --git a/out/api.batch.v1beta1.rs b/out/api.batch.v1beta1.rs index 4bfa095..79347c3 100644 --- a/out/api.batch.v1beta1.rs +++ b/out/api.batch.v1beta1.rs @@ -114,3 +114,4 @@ pub struct JobTemplateSpec { #[prost(message, optional, tag="2")] pub spec: ::core::option::Option, } +// TODO genericsfor api.batch.v1beta1 diff --git a/out/api.certificates.v1.rs b/out/api.certificates.v1.rs index f80f2f2..3f36afe 100644 --- a/out/api.certificates.v1.rs +++ b/out/api.certificates.v1.rs @@ -223,3 +223,4 @@ pub struct ExtraValue { #[prost(string, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +// TODO genericsfor api.certificates.v1 diff --git a/out/api.certificates.v1beta1.rs b/out/api.certificates.v1beta1.rs index d93150f..1bac015 100644 --- a/out/api.certificates.v1beta1.rs +++ b/out/api.certificates.v1beta1.rs @@ -174,3 +174,4 @@ pub struct ExtraValue { #[prost(string, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +// TODO genericsfor api.certificates.v1beta1 diff --git a/out/api.coordination.v1.rs b/out/api.coordination.v1.rs index 6ace99f..e010dfe 100644 --- a/out/api.coordination.v1.rs +++ b/out/api.coordination.v1.rs @@ -51,3 +51,4 @@ pub struct LeaseSpec { #[prost(int32, optional, tag="5")] pub lease_transitions: ::core::option::Option, } +// TODO genericsfor api.coordination.v1 diff --git a/out/api.coordination.v1beta1.rs b/out/api.coordination.v1beta1.rs index 6ace99f..17b8802 100644 --- a/out/api.coordination.v1beta1.rs +++ b/out/api.coordination.v1beta1.rs @@ -51,3 +51,4 @@ pub struct LeaseSpec { #[prost(int32, optional, tag="5")] pub lease_transitions: ::core::option::Option, } +// TODO genericsfor api.coordination.v1beta1 diff --git a/out/api.core.v1.rs b/out/api.core.v1.rs index 8a6f463..726e6e9 100644 --- a/out/api.core.v1.rs +++ b/out/api.core.v1.rs @@ -5824,3 +5824,4 @@ pub struct WindowsSecurityContextOptions { #[prost(bool, optional, tag="4")] pub host_process: ::core::option::Option, } +// TODO genericsfor api.core.v1 diff --git a/out/api.discovery.v1.rs b/out/api.discovery.v1.rs index e38db1f..c924f96 100644 --- a/out/api.discovery.v1.rs +++ b/out/api.discovery.v1.rs @@ -171,3 +171,4 @@ pub struct ForZone { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.discovery.v1 diff --git a/out/api.discovery.v1beta1.rs b/out/api.discovery.v1beta1.rs index 359d20c..54b66cf 100644 --- a/out/api.discovery.v1beta1.rs +++ b/out/api.discovery.v1beta1.rs @@ -174,3 +174,4 @@ pub struct ForZone { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.discovery.v1beta1 diff --git a/out/api.events.v1.rs b/out/api.events.v1.rs index ccfd902..90a4d0c 100644 --- a/out/api.events.v1.rs +++ b/out/api.events.v1.rs @@ -98,3 +98,4 @@ pub struct EventSeries { #[prost(message, optional, tag="2")] pub last_observed_time: ::core::option::Option, } +// TODO genericsfor api.events.v1 diff --git a/out/api.events.v1beta1.rs b/out/api.events.v1beta1.rs index 93862d4..1ac4c84 100644 --- a/out/api.events.v1beta1.rs +++ b/out/api.events.v1beta1.rs @@ -100,3 +100,4 @@ pub struct EventSeries { #[prost(message, optional, tag="2")] pub last_observed_time: ::core::option::Option, } +// TODO genericsfor api.events.v1beta1 diff --git a/out/api.extensions.v1beta1.rs b/out/api.extensions.v1beta1.rs index c861ba2..be677dd 100644 --- a/out/api.extensions.v1beta1.rs +++ b/out/api.extensions.v1beta1.rs @@ -1295,3 +1295,4 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.extensions.v1beta1 diff --git a/out/api.flowcontrol.v1alpha1.rs b/out/api.flowcontrol.v1alpha1.rs index 004c295..b9e0c02 100644 --- a/out/api.flowcontrol.v1alpha1.rs +++ b/out/api.flowcontrol.v1alpha1.rs @@ -428,3 +428,4 @@ pub struct UserSubject { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.flowcontrol.v1alpha1 diff --git a/out/api.flowcontrol.v1beta1.rs b/out/api.flowcontrol.v1beta1.rs index 004c295..bef2f9d 100644 --- a/out/api.flowcontrol.v1beta1.rs +++ b/out/api.flowcontrol.v1beta1.rs @@ -428,3 +428,4 @@ pub struct UserSubject { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.flowcontrol.v1beta1 diff --git a/out/api.imagepolicy.v1alpha1.rs b/out/api.imagepolicy.v1alpha1.rs index 96425b6..4d64919 100644 --- a/out/api.imagepolicy.v1alpha1.rs +++ b/out/api.imagepolicy.v1alpha1.rs @@ -60,3 +60,4 @@ pub struct ImageReviewStatus { #[prost(map="string, string", tag="3")] pub audit_annotations: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } +// TODO genericsfor api.imagepolicy.v1alpha1 diff --git a/out/api.networking.v1.rs b/out/api.networking.v1.rs index a221ef8..e6995b7 100644 --- a/out/api.networking.v1.rs +++ b/out/api.networking.v1.rs @@ -494,3 +494,4 @@ pub struct ServiceBackendPort { #[prost(int32, optional, tag="2")] pub number: ::core::option::Option, } +// TODO genericsfor api.networking.v1 diff --git a/out/api.networking.v1beta1.rs b/out/api.networking.v1beta1.rs index 57cde53..27fb552 100644 --- a/out/api.networking.v1beta1.rs +++ b/out/api.networking.v1beta1.rs @@ -285,3 +285,4 @@ pub struct IngressTls { #[prost(string, optional, tag="2")] pub secret_name: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.networking.v1beta1 diff --git a/out/api.node.v1.rs b/out/api.node.v1.rs index 88cb437..65e5d46 100644 --- a/out/api.node.v1.rs +++ b/out/api.node.v1.rs @@ -80,3 +80,4 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.node.v1 diff --git a/out/api.node.v1alpha1.rs b/out/api.node.v1alpha1.rs index 870c96c..fa6b26a 100644 --- a/out/api.node.v1alpha1.rs +++ b/out/api.node.v1alpha1.rs @@ -90,3 +90,4 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.node.v1alpha1 diff --git a/out/api.node.v1beta1.rs b/out/api.node.v1beta1.rs index d90936b..80e0c72 100644 --- a/out/api.node.v1beta1.rs +++ b/out/api.node.v1beta1.rs @@ -79,3 +79,4 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.node.v1beta1 diff --git a/out/api.policy.v1.rs b/out/api.policy.v1.rs index e091228..0c1ae4d 100644 --- a/out/api.policy.v1.rs +++ b/out/api.policy.v1.rs @@ -123,3 +123,4 @@ pub struct PodDisruptionBudgetStatus { #[prost(message, repeated, tag="7")] pub conditions: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.policy.v1 diff --git a/out/api.policy.v1beta1.rs b/out/api.policy.v1beta1.rs index 3e5927f..498cbfd 100644 --- a/out/api.policy.v1beta1.rs +++ b/out/api.policy.v1beta1.rs @@ -415,3 +415,4 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.policy.v1beta1 diff --git a/out/api.rbac.v1.rs b/out/api.rbac.v1.rs index cc0b323..209ee1c 100644 --- a/out/api.rbac.v1.rs +++ b/out/api.rbac.v1.rs @@ -181,3 +181,4 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.rbac.v1 diff --git a/out/api.rbac.v1alpha1.rs b/out/api.rbac.v1alpha1.rs index c186796..623c0cc 100644 --- a/out/api.rbac.v1alpha1.rs +++ b/out/api.rbac.v1alpha1.rs @@ -188,3 +188,4 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.rbac.v1alpha1 diff --git a/out/api.rbac.v1beta1.rs b/out/api.rbac.v1beta1.rs index 6014d60..f6be633 100644 --- a/out/api.rbac.v1beta1.rs +++ b/out/api.rbac.v1beta1.rs @@ -188,3 +188,4 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.rbac.v1beta1 diff --git a/out/api.scheduling.v1.rs b/out/api.scheduling.v1.rs index 31913ca..ff60b7a 100644 --- a/out/api.scheduling.v1.rs +++ b/out/api.scheduling.v1.rs @@ -44,3 +44,4 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.scheduling.v1 diff --git a/out/api.scheduling.v1alpha1.rs b/out/api.scheduling.v1alpha1.rs index 6001386..a23239d 100644 --- a/out/api.scheduling.v1alpha1.rs +++ b/out/api.scheduling.v1alpha1.rs @@ -45,3 +45,4 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.scheduling.v1alpha1 diff --git a/out/api.scheduling.v1beta1.rs b/out/api.scheduling.v1beta1.rs index 6001386..f60c9d6 100644 --- a/out/api.scheduling.v1beta1.rs +++ b/out/api.scheduling.v1beta1.rs @@ -45,3 +45,4 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor api.scheduling.v1beta1 diff --git a/out/api.storage.v1.rs b/out/api.storage.v1.rs index 6defaef..858c430 100644 --- a/out/api.storage.v1.rs +++ b/out/api.storage.v1.rs @@ -446,3 +446,4 @@ pub struct VolumeNodeResources { #[prost(int32, optional, tag="1")] pub count: ::core::option::Option, } +// TODO genericsfor api.storage.v1 diff --git a/out/api.storage.v1alpha1.rs b/out/api.storage.v1alpha1.rs index 93de6a0..ecdf4a1 100644 --- a/out/api.storage.v1alpha1.rs +++ b/out/api.storage.v1alpha1.rs @@ -201,3 +201,4 @@ pub struct VolumeError { #[prost(string, optional, tag="2")] pub message: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor api.storage.v1alpha1 diff --git a/out/api.storage.v1beta1.rs b/out/api.storage.v1beta1.rs index 54a447e..c746510 100644 --- a/out/api.storage.v1beta1.rs +++ b/out/api.storage.v1beta1.rs @@ -540,3 +540,4 @@ pub struct VolumeNodeResources { #[prost(int32, optional, tag="1")] pub count: ::core::option::Option, } +// TODO genericsfor api.storage.v1beta1 diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs index a225912..3a4bb92 100644 --- a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs +++ b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs @@ -649,3 +649,4 @@ pub struct WebhookConversion { #[prost(string, repeated, tag="3")] pub conversion_review_versions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +// TODO genericsfor apiextensions_apiserver.pkg.apis.apiextensions.v1 diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs index 3896478..52dcb6a 100644 --- a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs +++ b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs @@ -685,3 +685,4 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } +// TODO genericsfor apiextensions_apiserver.pkg.apis.apiextensions.v1beta1 diff --git a/out/apimachinery.pkg.api.resource.rs b/out/apimachinery.pkg.api.resource.rs index f0d8dfa..0ef59eb 100644 --- a/out/apimachinery.pkg.api.resource.rs +++ b/out/apimachinery.pkg.api.resource.rs @@ -61,3 +61,4 @@ pub struct Quantity { #[prost(string, optional, tag="1")] pub string: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor apimachinery.pkg.api.resource diff --git a/out/apimachinery.pkg.apis.meta.v1.rs b/out/apimachinery.pkg.apis.meta.v1.rs index 5424afe..c474e5b 100644 --- a/out/apimachinery.pkg.apis.meta.v1.rs +++ b/out/apimachinery.pkg.apis.meta.v1.rs @@ -1137,3 +1137,4 @@ pub struct WatchEvent { #[prost(message, optional, tag="2")] pub object: ::core::option::Option, } +// TODO genericsfor apimachinery.pkg.apis.meta.v1 diff --git a/out/apimachinery.pkg.apis.meta.v1beta1.rs b/out/apimachinery.pkg.apis.meta.v1beta1.rs index 42ecbe1..605e899 100644 --- a/out/apimachinery.pkg.apis.meta.v1beta1.rs +++ b/out/apimachinery.pkg.apis.meta.v1beta1.rs @@ -11,3 +11,4 @@ pub struct PartialObjectMetadataList { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor apimachinery.pkg.apis.meta.v1beta1 diff --git a/out/apimachinery.pkg.apis.testapigroup.v1.rs b/out/apimachinery.pkg.apis.testapigroup.v1.rs index ac3bdf1..12ed2e4 100644 --- a/out/apimachinery.pkg.apis.testapigroup.v1.rs +++ b/out/apimachinery.pkg.apis.testapigroup.v1.rs @@ -184,3 +184,4 @@ pub struct CarpStatus { #[prost(message, optional, tag="7")] pub start_time: ::core::option::Option, } +// TODO genericsfor apimachinery.pkg.apis.testapigroup.v1 diff --git a/out/apimachinery.pkg.runtime.rs b/out/apimachinery.pkg.runtime.rs index cb14af2..45182bf 100644 --- a/out/apimachinery.pkg.runtime.rs +++ b/out/apimachinery.pkg.runtime.rs @@ -102,3 +102,4 @@ pub struct Unknown { #[prost(string, optional, tag="4")] pub content_type: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor apimachinery.pkg.runtime diff --git a/out/apimachinery.pkg.runtime.schema.rs b/out/apimachinery.pkg.runtime.schema.rs index e69de29..ef6bec2 100644 --- a/out/apimachinery.pkg.runtime.schema.rs +++ b/out/apimachinery.pkg.runtime.schema.rs @@ -0,0 +1 @@ +// TODO genericsfor apimachinery.pkg.runtime.schema diff --git a/out/apimachinery.pkg.util.intstr.rs b/out/apimachinery.pkg.util.intstr.rs index 2cc8441..7362608 100644 --- a/out/apimachinery.pkg.util.intstr.rs +++ b/out/apimachinery.pkg.util.intstr.rs @@ -16,3 +16,4 @@ pub struct IntOrString { #[prost(string, optional, tag="3")] pub str_val: ::core::option::Option<::prost::alloc::string::String>, } +// TODO genericsfor apimachinery.pkg.util.intstr diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1.rs b/out/kube_aggregator.pkg.apis.apiregistration.v1.rs index 19901a0..c8f209a 100644 --- a/out/kube_aggregator.pkg.apis.apiregistration.v1.rs +++ b/out/kube_aggregator.pkg.apis.apiregistration.v1.rs @@ -125,3 +125,4 @@ pub struct ServiceReference { #[prost(int32, optional, tag="3")] pub port: ::core::option::Option, } +// TODO genericsfor kube_aggregator.pkg.apis.apiregistration.v1 diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs b/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs index 19901a0..23434a5 100644 --- a/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs +++ b/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs @@ -125,3 +125,4 @@ pub struct ServiceReference { #[prost(int32, optional, tag="3")] pub port: ::core::option::Option, } +// TODO genericsfor kube_aggregator.pkg.apis.apiregistration.v1beta1 diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta1.rs b/out/metrics.pkg.apis.custom_metrics.v1beta1.rs index b18cfc0..986cb64 100644 --- a/out/metrics.pkg.apis.custom_metrics.v1beta1.rs +++ b/out/metrics.pkg.apis.custom_metrics.v1beta1.rs @@ -49,3 +49,4 @@ pub struct MetricValueList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor metrics.pkg.apis.custom_metrics.v1beta1 diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta2.rs b/out/metrics.pkg.apis.custom_metrics.v1beta2.rs index 3f5ef86..e8231ae 100644 --- a/out/metrics.pkg.apis.custom_metrics.v1beta2.rs +++ b/out/metrics.pkg.apis.custom_metrics.v1beta2.rs @@ -55,3 +55,4 @@ pub struct MetricValueList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor metrics.pkg.apis.custom_metrics.v1beta2 diff --git a/out/metrics.pkg.apis.external_metrics.v1beta1.rs b/out/metrics.pkg.apis.external_metrics.v1beta1.rs index af50f86..7958817 100644 --- a/out/metrics.pkg.apis.external_metrics.v1beta1.rs +++ b/out/metrics.pkg.apis.external_metrics.v1beta1.rs @@ -31,3 +31,4 @@ pub struct ExternalMetricValueList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor metrics.pkg.apis.external_metrics.v1beta1 diff --git a/out/metrics.pkg.apis.metrics.v1alpha1.rs b/out/metrics.pkg.apis.metrics.v1alpha1.rs index eb026fc..5a158d9 100644 --- a/out/metrics.pkg.apis.metrics.v1alpha1.rs +++ b/out/metrics.pkg.apis.metrics.v1alpha1.rs @@ -60,3 +60,4 @@ pub struct PodMetricsList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor metrics.pkg.apis.metrics.v1alpha1 diff --git a/out/metrics.pkg.apis.metrics.v1beta1.rs b/out/metrics.pkg.apis.metrics.v1beta1.rs index eb026fc..98422aa 100644 --- a/out/metrics.pkg.apis.metrics.v1beta1.rs +++ b/out/metrics.pkg.apis.metrics.v1beta1.rs @@ -60,3 +60,4 @@ pub struct PodMetricsList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } +// TODO genericsfor metrics.pkg.apis.metrics.v1beta1 From 36d88890ba26090dd521ac2bddcbcf5f4463f9db Mon Sep 17 00:00:00 2001 From: kazk Date: Mon, 23 Aug 2021 16:16:54 -0700 Subject: [PATCH 05/16] Use `jq` to patch `swagger.json` Remove `gron` dependency and make it easier to maintain patches. --- README.md | 1 - justfile | 7 +------ openapi/patches/patch-nonexistent-gvk.jq | 13 +++++++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 openapi/patches/patch-nonexistent-gvk.jq diff --git a/README.md b/README.md index 34699a6..062a448 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ Experimenting with Kubernetes protobufs. ## Build Dependencies -- [gron](https://github.com/tomnomnom/gron) - [just](https://github.com/casey/just) - [sd](https://github.com/chmln/sd) - [jq](https://stedolan.github.io/jq/) diff --git a/justfile b/justfile index 692b2f9..524a9c3 100644 --- a/justfile +++ b/justfile @@ -43,12 +43,7 @@ swagger-patch: #!/usr/bin/env bash set -exuo pipefail cd openapi - # 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 - gron swagger.json \ - | perl -pe 's/(?<=kind = ")(Pod|Node|Service)(?:Attach|Exec|PortForward|Proxy)Options(?=")/$1/' \ - | gron -u \ - > swagger-patched.json + 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 diff --git a/openapi/patches/patch-nonexistent-gvk.jq b/openapi/patches/patch-nonexistent-gvk.jq new file mode 100644 index 0000000..7cc267b --- /dev/null +++ b/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 +) From fdea2e9acc8450388bd2ee5606331f14a09b93c8 Mon Sep 17 00:00:00 2001 From: kazk Date: Mon, 23 Aug 2021 16:19:21 -0700 Subject: [PATCH 06/16] Add `fd` to build dependencies list --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 062a448..ed98710 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ Experimenting with Kubernetes protobufs. ## Build Dependencies +- [fd](https://github.com/sharkdp/fd) +- [jq](https://stedolan.github.io/jq/) - [just](https://github.com/casey/just) - [sd](https://github.com/chmln/sd) -- [jq](https://stedolan.github.io/jq/) ## Protobufs We get protos by extracting them from pinned Kubernetes releases: From 6c85ca63ac368d966c887f9ccc3985c6f2840b08 Mon Sep 17 00:00:00 2001 From: clux Date: Wed, 15 Sep 2021 22:57:17 +0100 Subject: [PATCH 07/16] force build.rs to rebuild all on just build for now Signed-off-by: clux --- Cargo.toml | 1 + justfile | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 82f5529..b36a24a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "k8s-pb" version = "0.1.0" license = "Apache-2.0" edition = "2018" +include = ["/openapi", "/protos", "./protos.fds", "protos.list", "justfile"] [dependencies] bytes = "1.0.1" diff --git a/justfile b/justfile index 524a9c3..05b36e6 100644 --- a/justfile +++ b/justfile @@ -73,4 +73,5 @@ build: build-fds #!/usr/bin/env bash set -exuo pipefail rm -rf out/ && mkdir out + touch justfile cargo build From 159d3478af17ad844b40dfc7005f6eeed32eb983 Mon Sep 17 00:00:00 2001 From: clux Date: Thu, 16 Sep 2021 00:07:44 +0100 Subject: [PATCH 08/16] some attempts at a rudimentary matching with api-resources this is just a sketch. i think we definitely need to move this generation code elsewhere. the flow right now is very hard to deal with (script breaks => no output, so have to output into the output files instead). Signed-off-by: clux --- Cargo.toml | 2 + build.rs | 98 ++++++++++++++++++- out/api.admission.v1.rs | 2 +- out/api.admission.v1beta1.rs | 2 +- out/api.admissionregistration.v1.rs | 2 +- out/api.admissionregistration.v1beta1.rs | 2 +- out/api.apiserverinternal.v1alpha1.rs | 2 +- out/api.apps.v1.rs | 24 ++++- out/api.apps.v1beta1.rs | 2 +- out/api.apps.v1beta2.rs | 2 +- out/api.authentication.v1.rs | 2 +- out/api.authentication.v1beta1.rs | 2 +- out/api.authorization.v1.rs | 2 +- out/api.authorization.v1beta1.rs | 2 +- out/api.autoscaling.v1.rs | 21 +++- out/api.autoscaling.v2beta1.rs | 18 +++- out/api.autoscaling.v2beta2.rs | 24 ++++- out/api.batch.v1.rs | 10 +- out/api.batch.v1beta1.rs | 6 +- out/api.certificates.v1.rs | 2 +- out/api.certificates.v1beta1.rs | 2 +- out/api.coordination.v1.rs | 2 +- out/api.coordination.v1beta1.rs | 2 +- out/api.core.v1.rs | 2 +- out/api.discovery.v1.rs | 2 +- out/api.discovery.v1beta1.rs | 2 +- out/api.events.v1.rs | 2 +- out/api.events.v1beta1.rs | 2 +- out/api.extensions.v1beta1.rs | 2 +- out/api.flowcontrol.v1alpha1.rs | 2 +- out/api.flowcontrol.v1beta1.rs | 2 +- out/api.imagepolicy.v1alpha1.rs | 2 +- out/api.networking.v1.rs | 2 +- out/api.networking.v1beta1.rs | 2 +- out/api.node.v1.rs | 2 +- out/api.node.v1alpha1.rs | 2 +- out/api.node.v1beta1.rs | 2 +- out/api.policy.v1.rs | 5 +- out/api.policy.v1beta1.rs | 18 +++- out/api.rbac.v1.rs | 2 +- out/api.rbac.v1alpha1.rs | 2 +- out/api.rbac.v1beta1.rs | 2 +- out/api.scheduling.v1.rs | 2 +- out/api.scheduling.v1alpha1.rs | 2 +- out/api.scheduling.v1beta1.rs | 2 +- out/api.storage.v1.rs | 2 +- out/api.storage.v1alpha1.rs | 2 +- out/api.storage.v1beta1.rs | 2 +- ...ons_apiserver.pkg.apis.apiextensions.v1.rs | 1 - ...piserver.pkg.apis.apiextensions.v1beta1.rs | 1 - out/apimachinery.pkg.api.resource.rs | 1 - out/apimachinery.pkg.apis.meta.v1.rs | 1 - out/apimachinery.pkg.apis.meta.v1beta1.rs | 1 - out/apimachinery.pkg.apis.testapigroup.v1.rs | 1 - out/apimachinery.pkg.runtime.rs | 1 - out/apimachinery.pkg.runtime.schema.rs | 1 - out/apimachinery.pkg.util.intstr.rs | 1 - ..._aggregator.pkg.apis.apiregistration.v1.rs | 1 - ...egator.pkg.apis.apiregistration.v1beta1.rs | 1 - ...metrics.pkg.apis.custom_metrics.v1beta1.rs | 1 - ...metrics.pkg.apis.custom_metrics.v1beta2.rs | 1 - ...trics.pkg.apis.external_metrics.v1beta1.rs | 1 - out/metrics.pkg.apis.metrics.v1alpha1.rs | 1 - out/metrics.pkg.apis.metrics.v1beta1.rs | 1 - 64 files changed, 252 insertions(+), 66 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b36a24a..e3d6c3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,3 +13,5 @@ prost = "0.8.0" prost-build = "0.8.0" prost-types = "0.8.0" prost = "0.8.0" +serde_json = "1.0.67" +serde = { version = "1.0.130", features = ["derive"] } diff --git a/build.rs b/build.rs index 412ecbd..12b3f1f 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,72 @@ use prost_types::{FileDescriptorProto, FileDescriptorSet}; use prost::Message; +// codify structs in api-resource.json +// this is the root struct (we have a vector of them) +#[derive(serde::Deserialize)] +struct GenApiGroupResources { + apiGroupVersion: String, + resources: Vec +} +// main resource struct +#[derive(serde::Deserialize)] +struct GenApiResource { + /// plural name + name: String, + #[serde(default)] + namespaced: bool, + subresource: bool, + /// apigroup/ver + apiGroupVersion: String, + /// apigroup + group: String, + /// ver + version: String, + kind: String, + /// expected module path :: delimited + rust: String, + /// allowed verbs + verbs: Vec, + scopedVerbs: ScopedVerbs, + /// vec of found root paths + /// + /// "/apis/apps/v1/controllerrevisions", + /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", + /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" + paths: Vec, +} +#[derive(serde::Deserialize)] +struct ScopedVerbs { + #[serde(default)] + all: Vec, + #[serde(default)] + namespaced: Vec, +} + +impl GenApiResource { + fn generics(&self) -> String { + format!("// TODO generics for {} {}", self.name, self.apiGroupVersion) + } +} + +fn pkgname_to_api_key(pkg: &str) -> Option { + // TODO: this function is dumb. we probably need to have a better key in the root object than apiGroupVersion + // otherwise we'd have to match up weird paths like api.storage.v1 -> storage.k8s.io/v1 + if let Some((catpth, ver)) = pkg.rsplit_once(".") { + if let Some((category, pth)) = catpth.split_once(".") { + match category { + "api" => Some(format!("{}/{}", pth, ver)), + _ => None, + } + } else { + None + } + } else { + None + } +} + + fn main() -> std::io::Result<()> { let protos = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/protos.list")) .lines() @@ -12,7 +78,8 @@ fn main() -> std::io::Result<()> { .out_dir("./out") .compile_protos(protos.as_slice(), &["protos/"])?; - let apis = std::fs::read_to_string("./openapi/api-resources.json")?; + let apif = std::fs::read_to_string("./openapi/api-resources.json")?; + let apis: Vec = serde_json::from_str(&apif)?; let buf = std::fs::read("./protos.fds").unwrap(); let fds = FileDescriptorSet::decode(&*buf).unwrap(); // pulls in proto::Message @@ -23,9 +90,32 @@ fn main() -> std::io::Result<()> { use std::io::Write; if let Some(pkg) = f.package { let pkgpath = std::path::Path::new("./out").join(format!("{}.rs", pkg)); - let generics = format!("// TODO genericsfor {}\n", pkg); - let mut file = std::fs::OpenOptions::new().write(true).append(true).open(&pkgpath)?; - file.write(generics.as_bytes())?; + // match the pkg name to a key in api-resources.json + if let Some(apikey) = pkgname_to_api_key(&pkg) { + let mut codegen = vec![]; + // find the corresponding apiGroupVersion + if let Some(apigr) = apis.iter().find(|ag| ag.apiGroupVersion == apikey) { + for dp in f.message_type { + if let Some(name) = dp.name { + if name.ends_with("List") { + continue; + } + // find the inner resource with matching kind name + if let Some(api) = apigr.resources.iter().find(|gr| name == gr.kind) { + codegen.push(api.generics()); + } else { + codegen.push(format!("// NB: no-generics for {}/{} (not in {})", pkg, name, apikey)); + } + } + } + } else { + codegen.push(format!("// didn't find {}", apikey)); + } + let generics = codegen.join("\n"); + let mut file = std::fs::OpenOptions::new().write(true).append(true).open(&pkgpath)?; + file.write(generics.as_bytes())?; + + } } } diff --git a/out/api.admission.v1.rs b/out/api.admission.v1.rs index c0c727c..86c76e5 100644 --- a/out/api.admission.v1.rs +++ b/out/api.admission.v1.rs @@ -137,4 +137,4 @@ pub struct AdmissionReview { #[prost(message, optional, tag="2")] pub response: ::core::option::Option, } -// TODO genericsfor api.admission.v1 +// didn't find admission/v1 \ No newline at end of file diff --git a/out/api.admission.v1beta1.rs b/out/api.admission.v1beta1.rs index c3aecdf..e708110 100644 --- a/out/api.admission.v1beta1.rs +++ b/out/api.admission.v1beta1.rs @@ -137,4 +137,4 @@ pub struct AdmissionReview { #[prost(message, optional, tag="2")] pub response: ::core::option::Option, } -// TODO genericsfor api.admission.v1beta1 +// didn't find admission/v1beta1 \ No newline at end of file diff --git a/out/api.admissionregistration.v1.rs b/out/api.admissionregistration.v1.rs index 78b5473..c8c3c7c 100644 --- a/out/api.admissionregistration.v1.rs +++ b/out/api.admissionregistration.v1.rs @@ -457,4 +457,4 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } -// TODO genericsfor api.admissionregistration.v1 +// didn't find admissionregistration/v1 \ No newline at end of file diff --git a/out/api.admissionregistration.v1beta1.rs b/out/api.admissionregistration.v1beta1.rs index 7261bc7..45b0378 100644 --- a/out/api.admissionregistration.v1beta1.rs +++ b/out/api.admissionregistration.v1beta1.rs @@ -465,4 +465,4 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } -// TODO genericsfor api.admissionregistration.v1beta1 +// didn't find admissionregistration/v1beta1 \ No newline at end of file diff --git a/out/api.apiserverinternal.v1alpha1.rs b/out/api.apiserverinternal.v1alpha1.rs index ce33feb..fb74584 100644 --- a/out/api.apiserverinternal.v1alpha1.rs +++ b/out/api.apiserverinternal.v1alpha1.rs @@ -97,4 +97,4 @@ pub struct StorageVersionStatus { #[prost(message, repeated, tag="3")] pub conditions: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.apiserverinternal.v1alpha1 +// didn't find apiserverinternal/v1alpha1 \ No newline at end of file diff --git a/out/api.apps.v1.rs b/out/api.apps.v1.rs index f6028ff..9a0707d 100644 --- a/out/api.apps.v1.rs +++ b/out/api.apps.v1.rs @@ -737,4 +737,26 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } -// TODO genericsfor api.apps.v1 +// TODO generics for controllerrevisions apps/v1 +// TODO generics for daemonsets apps/v1 +// NB: no-generics for api.apps.v1/DaemonSetCondition (not in apps/v1) +// NB: no-generics for api.apps.v1/DaemonSetSpec (not in apps/v1) +// NB: no-generics for api.apps.v1/DaemonSetStatus (not in apps/v1) +// NB: no-generics for api.apps.v1/DaemonSetUpdateStrategy (not in apps/v1) +// TODO generics for deployments apps/v1 +// NB: no-generics for api.apps.v1/DeploymentCondition (not in apps/v1) +// NB: no-generics for api.apps.v1/DeploymentSpec (not in apps/v1) +// NB: no-generics for api.apps.v1/DeploymentStatus (not in apps/v1) +// NB: no-generics for api.apps.v1/DeploymentStrategy (not in apps/v1) +// TODO generics for replicasets apps/v1 +// NB: no-generics for api.apps.v1/ReplicaSetCondition (not in apps/v1) +// NB: no-generics for api.apps.v1/ReplicaSetSpec (not in apps/v1) +// NB: no-generics for api.apps.v1/ReplicaSetStatus (not in apps/v1) +// NB: no-generics for api.apps.v1/RollingUpdateDaemonSet (not in apps/v1) +// NB: no-generics for api.apps.v1/RollingUpdateDeployment (not in apps/v1) +// NB: no-generics for api.apps.v1/RollingUpdateStatefulSetStrategy (not in apps/v1) +// TODO generics for statefulsets apps/v1 +// NB: no-generics for api.apps.v1/StatefulSetCondition (not in apps/v1) +// NB: no-generics for api.apps.v1/StatefulSetSpec (not in apps/v1) +// NB: no-generics for api.apps.v1/StatefulSetStatus (not in apps/v1) +// NB: no-generics for api.apps.v1/StatefulSetUpdateStrategy (not in apps/v1) \ No newline at end of file diff --git a/out/api.apps.v1beta1.rs b/out/api.apps.v1beta1.rs index 8e61a36..b893a1c 100644 --- a/out/api.apps.v1beta1.rs +++ b/out/api.apps.v1beta1.rs @@ -484,4 +484,4 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } -// TODO genericsfor api.apps.v1beta1 +// didn't find apps/v1beta1 \ No newline at end of file diff --git a/out/api.apps.v1beta2.rs b/out/api.apps.v1beta2.rs index 5d9f05a..31db267 100644 --- a/out/api.apps.v1beta2.rs +++ b/out/api.apps.v1beta2.rs @@ -785,4 +785,4 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } -// TODO genericsfor api.apps.v1beta2 +// didn't find apps/v1beta2 \ No newline at end of file diff --git a/out/api.authentication.v1.rs b/out/api.authentication.v1.rs index 2026bb1..f247526 100644 --- a/out/api.authentication.v1.rs +++ b/out/api.authentication.v1.rs @@ -165,4 +165,4 @@ pub struct UserInfo { #[prost(map="string, message", tag="4")] pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ExtraValue>, } -// TODO genericsfor api.authentication.v1 +// didn't find authentication/v1 \ No newline at end of file diff --git a/out/api.authentication.v1beta1.rs b/out/api.authentication.v1beta1.rs index f981262..f8d6096 100644 --- a/out/api.authentication.v1beta1.rs +++ b/out/api.authentication.v1beta1.rs @@ -93,4 +93,4 @@ pub struct UserInfo { #[prost(map="string, message", tag="4")] pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ExtraValue>, } -// TODO genericsfor api.authentication.v1beta1 +// didn't find authentication/v1beta1 \ No newline at end of file diff --git a/out/api.authorization.v1.rs b/out/api.authorization.v1.rs index 631ba1a..7fb54ec 100644 --- a/out/api.authorization.v1.rs +++ b/out/api.authorization.v1.rs @@ -263,4 +263,4 @@ pub struct SubjectRulesReviewStatus { #[prost(string, optional, tag="4")] pub evaluation_error: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.authorization.v1 +// didn't find authorization/v1 \ No newline at end of file diff --git a/out/api.authorization.v1beta1.rs b/out/api.authorization.v1beta1.rs index fdace60..e05453d 100644 --- a/out/api.authorization.v1beta1.rs +++ b/out/api.authorization.v1beta1.rs @@ -263,4 +263,4 @@ pub struct SubjectRulesReviewStatus { #[prost(string, optional, tag="4")] pub evaluation_error: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.authorization.v1beta1 +// didn't find authorization/v1beta1 \ No newline at end of file diff --git a/out/api.autoscaling.v1.rs b/out/api.autoscaling.v1.rs index bddf130..807e46a 100644 --- a/out/api.autoscaling.v1.rs +++ b/out/api.autoscaling.v1.rs @@ -482,4 +482,23 @@ pub struct ScaleStatus { #[prost(string, optional, tag="2")] pub selector: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.autoscaling.v1 +// NB: no-generics for api.autoscaling.v1/ContainerResourceMetricSource (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ContainerResourceMetricStatus (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/CrossVersionObjectReference (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ExternalMetricSource (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ExternalMetricStatus (not in autoscaling/v1) +// TODO generics for horizontalpodautoscalers autoscaling/v1 +// NB: no-generics for api.autoscaling.v1/HorizontalPodAutoscalerCondition (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/HorizontalPodAutoscalerSpec (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/HorizontalPodAutoscalerStatus (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/MetricSpec (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/MetricStatus (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ObjectMetricSource (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ObjectMetricStatus (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/PodsMetricSource (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/PodsMetricStatus (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ResourceMetricSource (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ResourceMetricStatus (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/Scale (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ScaleSpec (not in autoscaling/v1) +// NB: no-generics for api.autoscaling.v1/ScaleStatus (not in autoscaling/v1) \ No newline at end of file diff --git a/out/api.autoscaling.v2beta1.rs b/out/api.autoscaling.v2beta1.rs index 6f3ed28..d6341fd 100644 --- a/out/api.autoscaling.v2beta1.rs +++ b/out/api.autoscaling.v2beta1.rs @@ -459,4 +459,20 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="3")] pub current_average_value: ::core::option::Option, } -// TODO genericsfor api.autoscaling.v2beta1 +// NB: no-generics for api.autoscaling.v2beta1/ContainerResourceMetricSource (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ContainerResourceMetricStatus (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/CrossVersionObjectReference (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ExternalMetricSource (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ExternalMetricStatus (not in autoscaling/v2beta1) +// TODO generics for horizontalpodautoscalers autoscaling/v2beta1 +// NB: no-generics for api.autoscaling.v2beta1/HorizontalPodAutoscalerCondition (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/HorizontalPodAutoscalerSpec (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/HorizontalPodAutoscalerStatus (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/MetricSpec (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/MetricStatus (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ObjectMetricSource (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ObjectMetricStatus (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/PodsMetricSource (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/PodsMetricStatus (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ResourceMetricSource (not in autoscaling/v2beta1) +// NB: no-generics for api.autoscaling.v2beta1/ResourceMetricStatus (not in autoscaling/v2beta1) \ No newline at end of file diff --git a/out/api.autoscaling.v2beta2.rs b/out/api.autoscaling.v2beta2.rs index 12d47b1..e2cb981 100644 --- a/out/api.autoscaling.v2beta2.rs +++ b/out/api.autoscaling.v2beta2.rs @@ -483,4 +483,26 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="2")] pub current: ::core::option::Option, } -// TODO genericsfor api.autoscaling.v2beta2 +// NB: no-generics for api.autoscaling.v2beta2/ContainerResourceMetricSource (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ContainerResourceMetricStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/CrossVersionObjectReference (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ExternalMetricSource (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ExternalMetricStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/HPAScalingPolicy (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/HPAScalingRules (not in autoscaling/v2beta2) +// TODO generics for horizontalpodautoscalers autoscaling/v2beta2 +// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerBehavior (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerCondition (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerSpec (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/MetricIdentifier (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/MetricSpec (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/MetricStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/MetricTarget (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/MetricValueStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ObjectMetricSource (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ObjectMetricStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/PodsMetricSource (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/PodsMetricStatus (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ResourceMetricSource (not in autoscaling/v2beta2) +// NB: no-generics for api.autoscaling.v2beta2/ResourceMetricStatus (not in autoscaling/v2beta2) \ No newline at end of file diff --git a/out/api.batch.v1.rs b/out/api.batch.v1.rs index ec3141c..a544252 100644 --- a/out/api.batch.v1.rs +++ b/out/api.batch.v1.rs @@ -348,4 +348,12 @@ pub struct UncountedTerminatedPods { #[prost(string, repeated, tag="2")] pub failed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -// TODO genericsfor api.batch.v1 +// TODO generics for cronjobs batch/v1 +// NB: no-generics for api.batch.v1/CronJobSpec (not in batch/v1) +// NB: no-generics for api.batch.v1/CronJobStatus (not in batch/v1) +// TODO generics for jobs batch/v1 +// NB: no-generics for api.batch.v1/JobCondition (not in batch/v1) +// NB: no-generics for api.batch.v1/JobSpec (not in batch/v1) +// NB: no-generics for api.batch.v1/JobStatus (not in batch/v1) +// NB: no-generics for api.batch.v1/JobTemplateSpec (not in batch/v1) +// NB: no-generics for api.batch.v1/UncountedTerminatedPods (not in batch/v1) \ No newline at end of file diff --git a/out/api.batch.v1beta1.rs b/out/api.batch.v1beta1.rs index 79347c3..6b818ee 100644 --- a/out/api.batch.v1beta1.rs +++ b/out/api.batch.v1beta1.rs @@ -114,4 +114,8 @@ pub struct JobTemplateSpec { #[prost(message, optional, tag="2")] pub spec: ::core::option::Option, } -// TODO genericsfor api.batch.v1beta1 +// TODO generics for cronjobs batch/v1beta1 +// NB: no-generics for api.batch.v1beta1/CronJobSpec (not in batch/v1beta1) +// NB: no-generics for api.batch.v1beta1/CronJobStatus (not in batch/v1beta1) +// NB: no-generics for api.batch.v1beta1/JobTemplate (not in batch/v1beta1) +// NB: no-generics for api.batch.v1beta1/JobTemplateSpec (not in batch/v1beta1) \ No newline at end of file diff --git a/out/api.certificates.v1.rs b/out/api.certificates.v1.rs index 3f36afe..66cba4b 100644 --- a/out/api.certificates.v1.rs +++ b/out/api.certificates.v1.rs @@ -223,4 +223,4 @@ pub struct ExtraValue { #[prost(string, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -// TODO genericsfor api.certificates.v1 +// didn't find certificates/v1 \ No newline at end of file diff --git a/out/api.certificates.v1beta1.rs b/out/api.certificates.v1beta1.rs index 1bac015..7e53a40 100644 --- a/out/api.certificates.v1beta1.rs +++ b/out/api.certificates.v1beta1.rs @@ -174,4 +174,4 @@ pub struct ExtraValue { #[prost(string, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -// TODO genericsfor api.certificates.v1beta1 +// didn't find certificates/v1beta1 \ No newline at end of file diff --git a/out/api.coordination.v1.rs b/out/api.coordination.v1.rs index e010dfe..12897df 100644 --- a/out/api.coordination.v1.rs +++ b/out/api.coordination.v1.rs @@ -51,4 +51,4 @@ pub struct LeaseSpec { #[prost(int32, optional, tag="5")] pub lease_transitions: ::core::option::Option, } -// TODO genericsfor api.coordination.v1 +// didn't find coordination/v1 \ No newline at end of file diff --git a/out/api.coordination.v1beta1.rs b/out/api.coordination.v1beta1.rs index 17b8802..56b51bc 100644 --- a/out/api.coordination.v1beta1.rs +++ b/out/api.coordination.v1beta1.rs @@ -51,4 +51,4 @@ pub struct LeaseSpec { #[prost(int32, optional, tag="5")] pub lease_transitions: ::core::option::Option, } -// TODO genericsfor api.coordination.v1beta1 +// didn't find coordination/v1beta1 \ No newline at end of file diff --git a/out/api.core.v1.rs b/out/api.core.v1.rs index 726e6e9..90c9204 100644 --- a/out/api.core.v1.rs +++ b/out/api.core.v1.rs @@ -5824,4 +5824,4 @@ pub struct WindowsSecurityContextOptions { #[prost(bool, optional, tag="4")] pub host_process: ::core::option::Option, } -// TODO genericsfor api.core.v1 +// didn't find core/v1 \ No newline at end of file diff --git a/out/api.discovery.v1.rs b/out/api.discovery.v1.rs index c924f96..271a611 100644 --- a/out/api.discovery.v1.rs +++ b/out/api.discovery.v1.rs @@ -171,4 +171,4 @@ pub struct ForZone { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.discovery.v1 +// didn't find discovery/v1 \ No newline at end of file diff --git a/out/api.discovery.v1beta1.rs b/out/api.discovery.v1beta1.rs index 54b66cf..14e121d 100644 --- a/out/api.discovery.v1beta1.rs +++ b/out/api.discovery.v1beta1.rs @@ -174,4 +174,4 @@ pub struct ForZone { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.discovery.v1beta1 +// didn't find discovery/v1beta1 \ No newline at end of file diff --git a/out/api.events.v1.rs b/out/api.events.v1.rs index 90a4d0c..eab79bf 100644 --- a/out/api.events.v1.rs +++ b/out/api.events.v1.rs @@ -98,4 +98,4 @@ pub struct EventSeries { #[prost(message, optional, tag="2")] pub last_observed_time: ::core::option::Option, } -// TODO genericsfor api.events.v1 +// didn't find events/v1 \ No newline at end of file diff --git a/out/api.events.v1beta1.rs b/out/api.events.v1beta1.rs index 1ac4c84..4ad8872 100644 --- a/out/api.events.v1beta1.rs +++ b/out/api.events.v1beta1.rs @@ -100,4 +100,4 @@ pub struct EventSeries { #[prost(message, optional, tag="2")] pub last_observed_time: ::core::option::Option, } -// TODO genericsfor api.events.v1beta1 +// didn't find events/v1beta1 \ No newline at end of file diff --git a/out/api.extensions.v1beta1.rs b/out/api.extensions.v1beta1.rs index be677dd..750fa90 100644 --- a/out/api.extensions.v1beta1.rs +++ b/out/api.extensions.v1beta1.rs @@ -1295,4 +1295,4 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.extensions.v1beta1 +// didn't find extensions/v1beta1 \ No newline at end of file diff --git a/out/api.flowcontrol.v1alpha1.rs b/out/api.flowcontrol.v1alpha1.rs index b9e0c02..ceebf44 100644 --- a/out/api.flowcontrol.v1alpha1.rs +++ b/out/api.flowcontrol.v1alpha1.rs @@ -428,4 +428,4 @@ pub struct UserSubject { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.flowcontrol.v1alpha1 +// didn't find flowcontrol/v1alpha1 \ No newline at end of file diff --git a/out/api.flowcontrol.v1beta1.rs b/out/api.flowcontrol.v1beta1.rs index bef2f9d..f4d9a98 100644 --- a/out/api.flowcontrol.v1beta1.rs +++ b/out/api.flowcontrol.v1beta1.rs @@ -428,4 +428,4 @@ pub struct UserSubject { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.flowcontrol.v1beta1 +// didn't find flowcontrol/v1beta1 \ No newline at end of file diff --git a/out/api.imagepolicy.v1alpha1.rs b/out/api.imagepolicy.v1alpha1.rs index 4d64919..be9edcc 100644 --- a/out/api.imagepolicy.v1alpha1.rs +++ b/out/api.imagepolicy.v1alpha1.rs @@ -60,4 +60,4 @@ pub struct ImageReviewStatus { #[prost(map="string, string", tag="3")] pub audit_annotations: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -// TODO genericsfor api.imagepolicy.v1alpha1 +// didn't find imagepolicy/v1alpha1 \ No newline at end of file diff --git a/out/api.networking.v1.rs b/out/api.networking.v1.rs index e6995b7..23294f4 100644 --- a/out/api.networking.v1.rs +++ b/out/api.networking.v1.rs @@ -494,4 +494,4 @@ pub struct ServiceBackendPort { #[prost(int32, optional, tag="2")] pub number: ::core::option::Option, } -// TODO genericsfor api.networking.v1 +// didn't find networking/v1 \ No newline at end of file diff --git a/out/api.networking.v1beta1.rs b/out/api.networking.v1beta1.rs index 27fb552..8afb5c2 100644 --- a/out/api.networking.v1beta1.rs +++ b/out/api.networking.v1beta1.rs @@ -285,4 +285,4 @@ pub struct IngressTls { #[prost(string, optional, tag="2")] pub secret_name: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.networking.v1beta1 +// didn't find networking/v1beta1 \ No newline at end of file diff --git a/out/api.node.v1.rs b/out/api.node.v1.rs index 65e5d46..23a2f63 100644 --- a/out/api.node.v1.rs +++ b/out/api.node.v1.rs @@ -80,4 +80,4 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.node.v1 +// didn't find node/v1 \ No newline at end of file diff --git a/out/api.node.v1alpha1.rs b/out/api.node.v1alpha1.rs index fa6b26a..cd59c24 100644 --- a/out/api.node.v1alpha1.rs +++ b/out/api.node.v1alpha1.rs @@ -90,4 +90,4 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.node.v1alpha1 +// didn't find node/v1alpha1 \ No newline at end of file diff --git a/out/api.node.v1beta1.rs b/out/api.node.v1beta1.rs index 80e0c72..7a140fe 100644 --- a/out/api.node.v1beta1.rs +++ b/out/api.node.v1beta1.rs @@ -79,4 +79,4 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.node.v1beta1 +// didn't find node/v1beta1 \ No newline at end of file diff --git a/out/api.policy.v1.rs b/out/api.policy.v1.rs index 0c1ae4d..b8738f3 100644 --- a/out/api.policy.v1.rs +++ b/out/api.policy.v1.rs @@ -123,4 +123,7 @@ pub struct PodDisruptionBudgetStatus { #[prost(message, repeated, tag="7")] pub conditions: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.policy.v1 +// NB: no-generics for api.policy.v1/Eviction (not in policy/v1) +// TODO generics for poddisruptionbudgets policy/v1 +// NB: no-generics for api.policy.v1/PodDisruptionBudgetSpec (not in policy/v1) +// NB: no-generics for api.policy.v1/PodDisruptionBudgetStatus (not in policy/v1) \ No newline at end of file diff --git a/out/api.policy.v1beta1.rs b/out/api.policy.v1beta1.rs index 498cbfd..fc6e027 100644 --- a/out/api.policy.v1beta1.rs +++ b/out/api.policy.v1beta1.rs @@ -415,4 +415,20 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.policy.v1beta1 +// NB: no-generics for api.policy.v1beta1/AllowedCSIDriver (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/AllowedFlexVolume (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/AllowedHostPath (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/Eviction (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/FSGroupStrategyOptions (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/HostPortRange (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/IDRange (not in policy/v1beta1) +// TODO generics for poddisruptionbudgets policy/v1beta1 +// NB: no-generics for api.policy.v1beta1/PodDisruptionBudgetSpec (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/PodDisruptionBudgetStatus (not in policy/v1beta1) +// TODO generics for podsecuritypolicies policy/v1beta1 +// NB: no-generics for api.policy.v1beta1/PodSecurityPolicySpec (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/RunAsGroupStrategyOptions (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/RunAsUserStrategyOptions (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/RuntimeClassStrategyOptions (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/SELinuxStrategyOptions (not in policy/v1beta1) +// NB: no-generics for api.policy.v1beta1/SupplementalGroupsStrategyOptions (not in policy/v1beta1) \ No newline at end of file diff --git a/out/api.rbac.v1.rs b/out/api.rbac.v1.rs index 209ee1c..9ec9cc2 100644 --- a/out/api.rbac.v1.rs +++ b/out/api.rbac.v1.rs @@ -181,4 +181,4 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.rbac.v1 +// didn't find rbac/v1 \ No newline at end of file diff --git a/out/api.rbac.v1alpha1.rs b/out/api.rbac.v1alpha1.rs index 623c0cc..b9571e1 100644 --- a/out/api.rbac.v1alpha1.rs +++ b/out/api.rbac.v1alpha1.rs @@ -188,4 +188,4 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.rbac.v1alpha1 +// didn't find rbac/v1alpha1 \ No newline at end of file diff --git a/out/api.rbac.v1beta1.rs b/out/api.rbac.v1beta1.rs index f6be633..01bd69c 100644 --- a/out/api.rbac.v1beta1.rs +++ b/out/api.rbac.v1beta1.rs @@ -188,4 +188,4 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.rbac.v1beta1 +// didn't find rbac/v1beta1 \ No newline at end of file diff --git a/out/api.scheduling.v1.rs b/out/api.scheduling.v1.rs index ff60b7a..1a57f95 100644 --- a/out/api.scheduling.v1.rs +++ b/out/api.scheduling.v1.rs @@ -44,4 +44,4 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.scheduling.v1 +// didn't find scheduling/v1 \ No newline at end of file diff --git a/out/api.scheduling.v1alpha1.rs b/out/api.scheduling.v1alpha1.rs index a23239d..c55f16e 100644 --- a/out/api.scheduling.v1alpha1.rs +++ b/out/api.scheduling.v1alpha1.rs @@ -45,4 +45,4 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.scheduling.v1alpha1 +// didn't find scheduling/v1alpha1 \ No newline at end of file diff --git a/out/api.scheduling.v1beta1.rs b/out/api.scheduling.v1beta1.rs index f60c9d6..5b9b009 100644 --- a/out/api.scheduling.v1beta1.rs +++ b/out/api.scheduling.v1beta1.rs @@ -45,4 +45,4 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor api.scheduling.v1beta1 +// didn't find scheduling/v1beta1 \ No newline at end of file diff --git a/out/api.storage.v1.rs b/out/api.storage.v1.rs index 858c430..9583977 100644 --- a/out/api.storage.v1.rs +++ b/out/api.storage.v1.rs @@ -446,4 +446,4 @@ pub struct VolumeNodeResources { #[prost(int32, optional, tag="1")] pub count: ::core::option::Option, } -// TODO genericsfor api.storage.v1 +// didn't find storage/v1 \ No newline at end of file diff --git a/out/api.storage.v1alpha1.rs b/out/api.storage.v1alpha1.rs index ecdf4a1..4d57010 100644 --- a/out/api.storage.v1alpha1.rs +++ b/out/api.storage.v1alpha1.rs @@ -201,4 +201,4 @@ pub struct VolumeError { #[prost(string, optional, tag="2")] pub message: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor api.storage.v1alpha1 +// didn't find storage/v1alpha1 \ No newline at end of file diff --git a/out/api.storage.v1beta1.rs b/out/api.storage.v1beta1.rs index c746510..7238bc7 100644 --- a/out/api.storage.v1beta1.rs +++ b/out/api.storage.v1beta1.rs @@ -540,4 +540,4 @@ pub struct VolumeNodeResources { #[prost(int32, optional, tag="1")] pub count: ::core::option::Option, } -// TODO genericsfor api.storage.v1beta1 +// didn't find storage/v1beta1 \ No newline at end of file diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs index 3a4bb92..a225912 100644 --- a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs +++ b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs @@ -649,4 +649,3 @@ pub struct WebhookConversion { #[prost(string, repeated, tag="3")] pub conversion_review_versions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -// TODO genericsfor apiextensions_apiserver.pkg.apis.apiextensions.v1 diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs index 52dcb6a..3896478 100644 --- a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs +++ b/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs @@ -685,4 +685,3 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } -// TODO genericsfor apiextensions_apiserver.pkg.apis.apiextensions.v1beta1 diff --git a/out/apimachinery.pkg.api.resource.rs b/out/apimachinery.pkg.api.resource.rs index 0ef59eb..f0d8dfa 100644 --- a/out/apimachinery.pkg.api.resource.rs +++ b/out/apimachinery.pkg.api.resource.rs @@ -61,4 +61,3 @@ pub struct Quantity { #[prost(string, optional, tag="1")] pub string: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor apimachinery.pkg.api.resource diff --git a/out/apimachinery.pkg.apis.meta.v1.rs b/out/apimachinery.pkg.apis.meta.v1.rs index c474e5b..5424afe 100644 --- a/out/apimachinery.pkg.apis.meta.v1.rs +++ b/out/apimachinery.pkg.apis.meta.v1.rs @@ -1137,4 +1137,3 @@ pub struct WatchEvent { #[prost(message, optional, tag="2")] pub object: ::core::option::Option, } -// TODO genericsfor apimachinery.pkg.apis.meta.v1 diff --git a/out/apimachinery.pkg.apis.meta.v1beta1.rs b/out/apimachinery.pkg.apis.meta.v1beta1.rs index 605e899..42ecbe1 100644 --- a/out/apimachinery.pkg.apis.meta.v1beta1.rs +++ b/out/apimachinery.pkg.apis.meta.v1beta1.rs @@ -11,4 +11,3 @@ pub struct PartialObjectMetadataList { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor apimachinery.pkg.apis.meta.v1beta1 diff --git a/out/apimachinery.pkg.apis.testapigroup.v1.rs b/out/apimachinery.pkg.apis.testapigroup.v1.rs index 12ed2e4..ac3bdf1 100644 --- a/out/apimachinery.pkg.apis.testapigroup.v1.rs +++ b/out/apimachinery.pkg.apis.testapigroup.v1.rs @@ -184,4 +184,3 @@ pub struct CarpStatus { #[prost(message, optional, tag="7")] pub start_time: ::core::option::Option, } -// TODO genericsfor apimachinery.pkg.apis.testapigroup.v1 diff --git a/out/apimachinery.pkg.runtime.rs b/out/apimachinery.pkg.runtime.rs index 45182bf..cb14af2 100644 --- a/out/apimachinery.pkg.runtime.rs +++ b/out/apimachinery.pkg.runtime.rs @@ -102,4 +102,3 @@ pub struct Unknown { #[prost(string, optional, tag="4")] pub content_type: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor apimachinery.pkg.runtime diff --git a/out/apimachinery.pkg.runtime.schema.rs b/out/apimachinery.pkg.runtime.schema.rs index ef6bec2..e69de29 100644 --- a/out/apimachinery.pkg.runtime.schema.rs +++ b/out/apimachinery.pkg.runtime.schema.rs @@ -1 +0,0 @@ -// TODO genericsfor apimachinery.pkg.runtime.schema diff --git a/out/apimachinery.pkg.util.intstr.rs b/out/apimachinery.pkg.util.intstr.rs index 7362608..2cc8441 100644 --- a/out/apimachinery.pkg.util.intstr.rs +++ b/out/apimachinery.pkg.util.intstr.rs @@ -16,4 +16,3 @@ pub struct IntOrString { #[prost(string, optional, tag="3")] pub str_val: ::core::option::Option<::prost::alloc::string::String>, } -// TODO genericsfor apimachinery.pkg.util.intstr diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1.rs b/out/kube_aggregator.pkg.apis.apiregistration.v1.rs index c8f209a..19901a0 100644 --- a/out/kube_aggregator.pkg.apis.apiregistration.v1.rs +++ b/out/kube_aggregator.pkg.apis.apiregistration.v1.rs @@ -125,4 +125,3 @@ pub struct ServiceReference { #[prost(int32, optional, tag="3")] pub port: ::core::option::Option, } -// TODO genericsfor kube_aggregator.pkg.apis.apiregistration.v1 diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs b/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs index 23434a5..19901a0 100644 --- a/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs +++ b/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs @@ -125,4 +125,3 @@ pub struct ServiceReference { #[prost(int32, optional, tag="3")] pub port: ::core::option::Option, } -// TODO genericsfor kube_aggregator.pkg.apis.apiregistration.v1beta1 diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta1.rs b/out/metrics.pkg.apis.custom_metrics.v1beta1.rs index 986cb64..b18cfc0 100644 --- a/out/metrics.pkg.apis.custom_metrics.v1beta1.rs +++ b/out/metrics.pkg.apis.custom_metrics.v1beta1.rs @@ -49,4 +49,3 @@ pub struct MetricValueList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor metrics.pkg.apis.custom_metrics.v1beta1 diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta2.rs b/out/metrics.pkg.apis.custom_metrics.v1beta2.rs index e8231ae..3f5ef86 100644 --- a/out/metrics.pkg.apis.custom_metrics.v1beta2.rs +++ b/out/metrics.pkg.apis.custom_metrics.v1beta2.rs @@ -55,4 +55,3 @@ pub struct MetricValueList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor metrics.pkg.apis.custom_metrics.v1beta2 diff --git a/out/metrics.pkg.apis.external_metrics.v1beta1.rs b/out/metrics.pkg.apis.external_metrics.v1beta1.rs index 7958817..af50f86 100644 --- a/out/metrics.pkg.apis.external_metrics.v1beta1.rs +++ b/out/metrics.pkg.apis.external_metrics.v1beta1.rs @@ -31,4 +31,3 @@ pub struct ExternalMetricValueList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor metrics.pkg.apis.external_metrics.v1beta1 diff --git a/out/metrics.pkg.apis.metrics.v1alpha1.rs b/out/metrics.pkg.apis.metrics.v1alpha1.rs index 5a158d9..eb026fc 100644 --- a/out/metrics.pkg.apis.metrics.v1alpha1.rs +++ b/out/metrics.pkg.apis.metrics.v1alpha1.rs @@ -60,4 +60,3 @@ pub struct PodMetricsList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor metrics.pkg.apis.metrics.v1alpha1 diff --git a/out/metrics.pkg.apis.metrics.v1beta1.rs b/out/metrics.pkg.apis.metrics.v1beta1.rs index 98422aa..eb026fc 100644 --- a/out/metrics.pkg.apis.metrics.v1beta1.rs +++ b/out/metrics.pkg.apis.metrics.v1beta1.rs @@ -60,4 +60,3 @@ pub struct PodMetricsList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// TODO genericsfor metrics.pkg.apis.metrics.v1beta1 From 61baaa4fce17615b9a726eac80ebdd173560ea7a Mon Sep 17 00:00:00 2001 From: clux Date: Thu, 16 Sep 2021 23:52:06 +0100 Subject: [PATCH 09/16] move build.rs into a codegen crate Signed-off-by: clux --- Cargo.toml | 23 +--- README.md | 4 +- build.rs | 125 ------------------ justfile | 14 +- k8s-pb-codegen/Cargo.toml | 24 ++++ .../openapi}/api-resources.json | 0 .../openapi}/list-paths.jq | 0 .../openapi}/list-resources.jq | 0 .../openapi}/patches/patch-nonexistent-gvk.jq | 0 .../openapi}/swagger.json | 0 .../out}/api.admission.v1.rs | 1 - .../out}/api.admission.v1beta1.rs | 1 - .../out}/api.admissionregistration.v1.rs | 1 - .../out}/api.admissionregistration.v1beta1.rs | 1 - .../out}/api.apiserverinternal.v1alpha1.rs | 1 - {out => k8s-pb-codegen/out}/api.apps.v1.rs | 20 +-- .../out}/api.apps.v1beta1.rs | 1 - .../out}/api.apps.v1beta2.rs | 1 - .../out}/api.authentication.v1.rs | 1 - .../out}/api.authentication.v1beta1.rs | 1 - .../out}/api.authorization.v1.rs | 1 - .../out}/api.authorization.v1beta1.rs | 1 - .../out}/api.autoscaling.v1.rs | 21 +-- .../out}/api.autoscaling.v2beta1.rs | 18 +-- .../out}/api.autoscaling.v2beta2.rs | 24 +--- {out => k8s-pb-codegen/out}/api.batch.v1.rs | 9 +- .../out}/api.batch.v1beta1.rs | 6 +- .../out}/api.certificates.v1.rs | 1 - .../out}/api.certificates.v1beta1.rs | 1 - .../out}/api.coordination.v1.rs | 1 - .../out}/api.coordination.v1beta1.rs | 1 - {out => k8s-pb-codegen/out}/api.core.v1.rs | 1 - .../out}/api.discovery.v1.rs | 1 - .../out}/api.discovery.v1beta1.rs | 1 - {out => k8s-pb-codegen/out}/api.events.v1.rs | 1 - .../out}/api.events.v1beta1.rs | 1 - .../out}/api.extensions.v1beta1.rs | 1 - .../out}/api.flowcontrol.v1alpha1.rs | 1 - .../out}/api.flowcontrol.v1beta1.rs | 1 - .../out}/api.imagepolicy.v1alpha1.rs | 1 - .../out}/api.networking.v1.rs | 1 - .../out}/api.networking.v1beta1.rs | 1 - {out => k8s-pb-codegen/out}/api.node.v1.rs | 1 - .../out}/api.node.v1alpha1.rs | 1 - .../out}/api.node.v1beta1.rs | 1 - {out => k8s-pb-codegen/out}/api.policy.v1.rs | 5 +- .../out}/api.policy.v1beta1.rs | 17 +-- {out => k8s-pb-codegen/out}/api.rbac.v1.rs | 1 - .../out}/api.rbac.v1alpha1.rs | 1 - .../out}/api.rbac.v1beta1.rs | 1 - .../out}/api.scheduling.v1.rs | 1 - .../out}/api.scheduling.v1alpha1.rs | 1 - .../out}/api.scheduling.v1beta1.rs | 1 - {out => k8s-pb-codegen/out}/api.storage.v1.rs | 1 - .../out}/api.storage.v1alpha1.rs | 1 - .../out}/api.storage.v1beta1.rs | 1 - ...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/pbcodegen.rs | 86 ++++++++++++ protos.list => k8s-pb-codegen/protos.list | 0 .../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 | 65 +++++++++ k8s-pb/Cargo.toml | 8 ++ k8s-pb/src/lib.rs | 7 + 139 files changed, 213 insertions(+), 301 deletions(-) delete mode 100644 build.rs 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%) rename {openapi => k8s-pb-codegen/openapi}/patches/patch-nonexistent-gvk.jq (100%) rename {openapi => k8s-pb-codegen/openapi}/swagger.json (100%) rename {out => k8s-pb-codegen/out}/api.admission.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.admission.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.admissionregistration.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.admissionregistration.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.apiserverinternal.v1alpha1.rs (99%) rename {out => k8s-pb-codegen/out}/api.apps.v1.rs (96%) rename {out => k8s-pb-codegen/out}/api.apps.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.apps.v1beta2.rs (99%) rename {out => k8s-pb-codegen/out}/api.authentication.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.authentication.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.authorization.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.authorization.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.autoscaling.v1.rs (94%) rename {out => k8s-pb-codegen/out}/api.autoscaling.v2beta1.rs (94%) rename {out => k8s-pb-codegen/out}/api.autoscaling.v2beta2.rs (92%) rename {out => k8s-pb-codegen/out}/api.batch.v1.rs (97%) rename {out => k8s-pb-codegen/out}/api.batch.v1beta1.rs (94%) rename {out => k8s-pb-codegen/out}/api.certificates.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.certificates.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.coordination.v1.rs (98%) rename {out => k8s-pb-codegen/out}/api.coordination.v1beta1.rs (98%) rename {out => k8s-pb-codegen/out}/api.core.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.discovery.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.discovery.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.events.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.events.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.extensions.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.flowcontrol.v1alpha1.rs (99%) rename {out => k8s-pb-codegen/out}/api.flowcontrol.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.imagepolicy.v1alpha1.rs (98%) rename {out => k8s-pb-codegen/out}/api.networking.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.networking.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.node.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.node.v1alpha1.rs (99%) rename {out => k8s-pb-codegen/out}/api.node.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.policy.v1.rs (96%) rename {out => k8s-pb-codegen/out}/api.policy.v1beta1.rs (94%) rename {out => k8s-pb-codegen/out}/api.rbac.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.rbac.v1alpha1.rs (99%) rename {out => k8s-pb-codegen/out}/api.rbac.v1beta1.rs (99%) rename {out => k8s-pb-codegen/out}/api.scheduling.v1.rs (98%) rename {out => k8s-pb-codegen/out}/api.scheduling.v1alpha1.rs (98%) rename {out => k8s-pb-codegen/out}/api.scheduling.v1beta1.rs (98%) rename {out => k8s-pb-codegen/out}/api.storage.v1.rs (99%) rename {out => k8s-pb-codegen/out}/api.storage.v1alpha1.rs (99%) rename {out => k8s-pb-codegen/out}/api.storage.v1beta1.rs (99%) 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/pbcodegen.rs rename protos.list => k8s-pb-codegen/protos.list (100%) 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/Cargo.toml create mode 100644 k8s-pb/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index e3d6c3e..34c5504 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,6 @@ -[package] -name = "k8s-pb" -version = "0.1.0" -license = "Apache-2.0" -edition = "2018" -include = ["/openapi", "/protos", "./protos.fds", "protos.list", "justfile"] - -[dependencies] -bytes = "1.0.1" -prost = "0.8.0" - -[build-dependencies] -prost-build = "0.8.0" -prost-types = "0.8.0" -prost = "0.8.0" -serde_json = "1.0.67" -serde = { version = "1.0.130", features = ["derive"] } +[workspace] +default-members = ["k8s-pb"] +members = [ + "k8s-pb-codegen", + "k8s-pb" +] diff --git a/README.md b/README.md index ed98710..7911567 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ Results of this step is committed already. But to run, invoke `just swagger`. ## 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. -Results of this step is committed already. But to run, invoke `just build` +Results of this step is committed already. But to run, invoke `just codegen` ### Hack -Generate a [`FileDescriptorSet`] containing all of the input files wih `just build-fds` +Generate a [`FileDescriptorSet`] containing all of the input files wih `just codegen-fds` ## OpenAPI Strategy diff --git a/build.rs b/build.rs deleted file mode 100644 index 12b3f1f..0000000 --- a/build.rs +++ /dev/null @@ -1,125 +0,0 @@ -use prost_types::{FileDescriptorProto, FileDescriptorSet}; -use prost::Message; - -// codify structs in api-resource.json -// this is the root struct (we have a vector of them) -#[derive(serde::Deserialize)] -struct GenApiGroupResources { - apiGroupVersion: String, - resources: Vec -} -// main resource struct -#[derive(serde::Deserialize)] -struct GenApiResource { - /// plural name - name: String, - #[serde(default)] - namespaced: bool, - subresource: bool, - /// apigroup/ver - apiGroupVersion: String, - /// apigroup - group: String, - /// ver - version: String, - kind: String, - /// expected module path :: delimited - rust: String, - /// allowed verbs - verbs: Vec, - scopedVerbs: ScopedVerbs, - /// vec of found root paths - /// - /// "/apis/apps/v1/controllerrevisions", - /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", - /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" - paths: Vec, -} -#[derive(serde::Deserialize)] -struct ScopedVerbs { - #[serde(default)] - all: Vec, - #[serde(default)] - namespaced: Vec, -} - -impl GenApiResource { - fn generics(&self) -> String { - format!("// TODO generics for {} {}", self.name, self.apiGroupVersion) - } -} - -fn pkgname_to_api_key(pkg: &str) -> Option { - // TODO: this function is dumb. we probably need to have a better key in the root object than apiGroupVersion - // otherwise we'd have to match up weird paths like api.storage.v1 -> storage.k8s.io/v1 - if let Some((catpth, ver)) = pkg.rsplit_once(".") { - if let Some((category, pth)) = catpth.split_once(".") { - match category { - "api" => Some(format!("{}/{}", pth, ver)), - _ => None, - } - } else { - None - } - } else { - None - } -} - - -fn main() -> std::io::Result<()> { - let protos = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/protos.list")) - .lines() - .collect::>(); - - prost_build::Config::new() - // should probably switch to this - //.btree_map(&["."]) - .out_dir("./out") - .compile_protos(protos.as_slice(), &["protos/"])?; - - let apif = std::fs::read_to_string("./openapi/api-resources.json")?; - let apis: Vec = serde_json::from_str(&apif)?; - - let buf = std::fs::read("./protos.fds").unwrap(); - 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 { - use std::io::Write; - if let Some(pkg) = f.package { - let pkgpath = std::path::Path::new("./out").join(format!("{}.rs", pkg)); - // match the pkg name to a key in api-resources.json - if let Some(apikey) = pkgname_to_api_key(&pkg) { - let mut codegen = vec![]; - // find the corresponding apiGroupVersion - if let Some(apigr) = apis.iter().find(|ag| ag.apiGroupVersion == apikey) { - for dp in f.message_type { - if let Some(name) = dp.name { - if name.ends_with("List") { - continue; - } - // find the inner resource with matching kind name - if let Some(api) = apigr.resources.iter().find(|gr| name == gr.kind) { - codegen.push(api.generics()); - } else { - codegen.push(format!("// NB: no-generics for {}/{} (not in {})", pkg, name, apikey)); - } - } - } - } else { - codegen.push(format!("// didn't find {}", apikey)); - } - let generics = codegen.join("\n"); - let mut file = std::fs::OpenOptions::new().write(true).append(true).open(&pkgpath)?; - file.write(generics.as_bytes())?; - - } - } - } - - // Generate code in `src/` by reading files in `OUT_DIR`? - // Need to create `mod.rs` file for each level based on the filename, and write generated code in correct file. - Ok(()) -} diff --git a/justfile b/justfile index 05b36e6..bb457b9 100644 --- a/justfile +++ b/justfile @@ -35,14 +35,14 @@ protos: protos-dl protos-patch protos-list swagger-dl: #!/usr/bin/env bash set -exuo pipefail - curl -sSL -o openapi/swagger.json \ + 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 openapi + cd k8s-pb-codegen/openapi jq -f patches/patch-nonexistent-gvk.jq < swagger.json > swagger-patched.json mv swagger-patched.json swagger.json @@ -50,17 +50,18 @@ swagger-patch: swagger-transform: #!/usr/bin/env bash set -exuo pipefail - cd openapi + 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 -build-fds: +codegen-fds: #!/usr/bin/env bash set -exuo pipefail shopt -s globstar + cd k8s-pb-codegen protoc \ --include_imports \ --include_source_info \ @@ -69,9 +70,8 @@ build-fds: ./protos/**/*.proto # Generate the library code from completed swagger and protos -build: build-fds +codegen: codegen-fds #!/usr/bin/env bash set -exuo pipefail rm -rf out/ && mkdir out - touch justfile - cargo build + cd k8s-pb-codegen && cargo run diff --git a/k8s-pb-codegen/Cargo.toml b/k8s-pb-codegen/Cargo.toml new file mode 100644 index 0000000..55195e0 --- /dev/null +++ b/k8s-pb-codegen/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "k8s-pb-codegen" +version = "0.1.0" +edition = "2018" +license = "Apache-2.0" + +[[bin]] +name = "pbcodegen" +path = "pbcodegen.rs" + +[lib] +name = "pbcodegen" +path = "src/lib.rs" + +[dependencies] +bytes = "1.0.1" +prost = "0.8.0" +prost-build = "0.8.0" +prost-types = "0.8.0" +serde_json = "1.0.67" +serde = { version = "1.0.130", features = ["derive"] } +log = "0.4.14" +anyhow = "1.0.44" +env_logger = "0.9.0" diff --git a/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json similarity index 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/openapi/patches/patch-nonexistent-gvk.jq b/k8s-pb-codegen/openapi/patches/patch-nonexistent-gvk.jq similarity index 100% rename from openapi/patches/patch-nonexistent-gvk.jq rename to k8s-pb-codegen/openapi/patches/patch-nonexistent-gvk.jq 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 99% rename from out/api.admission.v1.rs rename to k8s-pb-codegen/out/api.admission.v1.rs index 86c76e5..8f85492 100644 --- a/out/api.admission.v1.rs +++ b/k8s-pb-codegen/out/api.admission.v1.rs @@ -137,4 +137,3 @@ pub struct AdmissionReview { #[prost(message, optional, tag="2")] pub response: ::core::option::Option, } -// didn't find admission/v1 \ No newline at end of file diff --git a/out/api.admission.v1beta1.rs b/k8s-pb-codegen/out/api.admission.v1beta1.rs similarity index 99% rename from out/api.admission.v1beta1.rs rename to k8s-pb-codegen/out/api.admission.v1beta1.rs index e708110..f01a490 100644 --- a/out/api.admission.v1beta1.rs +++ b/k8s-pb-codegen/out/api.admission.v1beta1.rs @@ -137,4 +137,3 @@ pub struct AdmissionReview { #[prost(message, optional, tag="2")] pub response: ::core::option::Option, } -// didn't find admission/v1beta1 \ No newline at end of file diff --git a/out/api.admissionregistration.v1.rs b/k8s-pb-codegen/out/api.admissionregistration.v1.rs similarity index 99% rename from out/api.admissionregistration.v1.rs rename to k8s-pb-codegen/out/api.admissionregistration.v1.rs index c8c3c7c..dc3c146 100644 --- a/out/api.admissionregistration.v1.rs +++ b/k8s-pb-codegen/out/api.admissionregistration.v1.rs @@ -457,4 +457,3 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } -// didn't find admissionregistration/v1 \ No newline at end of file diff --git a/out/api.admissionregistration.v1beta1.rs b/k8s-pb-codegen/out/api.admissionregistration.v1beta1.rs similarity index 99% rename from out/api.admissionregistration.v1beta1.rs rename to k8s-pb-codegen/out/api.admissionregistration.v1beta1.rs index 45b0378..8ca0b5d 100644 --- a/out/api.admissionregistration.v1beta1.rs +++ b/k8s-pb-codegen/out/api.admissionregistration.v1beta1.rs @@ -465,4 +465,3 @@ pub struct WebhookClientConfig { #[prost(bytes="vec", optional, tag="2")] pub ca_bundle: ::core::option::Option<::prost::alloc::vec::Vec>, } -// didn't find admissionregistration/v1beta1 \ No newline at end of file diff --git a/out/api.apiserverinternal.v1alpha1.rs b/k8s-pb-codegen/out/api.apiserverinternal.v1alpha1.rs similarity index 99% rename from out/api.apiserverinternal.v1alpha1.rs rename to k8s-pb-codegen/out/api.apiserverinternal.v1alpha1.rs index fb74584..6617ffc 100644 --- a/out/api.apiserverinternal.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.apiserverinternal.v1alpha1.rs @@ -97,4 +97,3 @@ pub struct StorageVersionStatus { #[prost(message, repeated, tag="3")] pub conditions: ::prost::alloc::vec::Vec, } -// didn't find apiserverinternal/v1alpha1 \ No newline at end of file diff --git a/out/api.apps.v1.rs b/k8s-pb-codegen/out/api.apps.v1.rs similarity index 96% rename from out/api.apps.v1.rs rename to k8s-pb-codegen/out/api.apps.v1.rs index 9a0707d..d0e7388 100644 --- a/out/api.apps.v1.rs +++ b/k8s-pb-codegen/out/api.apps.v1.rs @@ -739,24 +739,6 @@ pub struct StatefulSetUpdateStrategy { } // TODO generics for controllerrevisions apps/v1 // TODO generics for daemonsets apps/v1 -// NB: no-generics for api.apps.v1/DaemonSetCondition (not in apps/v1) -// NB: no-generics for api.apps.v1/DaemonSetSpec (not in apps/v1) -// NB: no-generics for api.apps.v1/DaemonSetStatus (not in apps/v1) -// NB: no-generics for api.apps.v1/DaemonSetUpdateStrategy (not in apps/v1) // TODO generics for deployments apps/v1 -// NB: no-generics for api.apps.v1/DeploymentCondition (not in apps/v1) -// NB: no-generics for api.apps.v1/DeploymentSpec (not in apps/v1) -// NB: no-generics for api.apps.v1/DeploymentStatus (not in apps/v1) -// NB: no-generics for api.apps.v1/DeploymentStrategy (not in apps/v1) // TODO generics for replicasets apps/v1 -// NB: no-generics for api.apps.v1/ReplicaSetCondition (not in apps/v1) -// NB: no-generics for api.apps.v1/ReplicaSetSpec (not in apps/v1) -// NB: no-generics for api.apps.v1/ReplicaSetStatus (not in apps/v1) -// NB: no-generics for api.apps.v1/RollingUpdateDaemonSet (not in apps/v1) -// NB: no-generics for api.apps.v1/RollingUpdateDeployment (not in apps/v1) -// NB: no-generics for api.apps.v1/RollingUpdateStatefulSetStrategy (not in apps/v1) -// TODO generics for statefulsets apps/v1 -// NB: no-generics for api.apps.v1/StatefulSetCondition (not in apps/v1) -// NB: no-generics for api.apps.v1/StatefulSetSpec (not in apps/v1) -// NB: no-generics for api.apps.v1/StatefulSetStatus (not in apps/v1) -// NB: no-generics for api.apps.v1/StatefulSetUpdateStrategy (not in apps/v1) \ No newline at end of file +// TODO generics for statefulsets apps/v1 \ No newline at end of file diff --git a/out/api.apps.v1beta1.rs b/k8s-pb-codegen/out/api.apps.v1beta1.rs similarity index 99% rename from out/api.apps.v1beta1.rs rename to k8s-pb-codegen/out/api.apps.v1beta1.rs index b893a1c..696e470 100644 --- a/out/api.apps.v1beta1.rs +++ b/k8s-pb-codegen/out/api.apps.v1beta1.rs @@ -484,4 +484,3 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } -// didn't find apps/v1beta1 \ No newline at end of file diff --git a/out/api.apps.v1beta2.rs b/k8s-pb-codegen/out/api.apps.v1beta2.rs similarity index 99% rename from out/api.apps.v1beta2.rs rename to k8s-pb-codegen/out/api.apps.v1beta2.rs index 31db267..e0c0ae0 100644 --- a/out/api.apps.v1beta2.rs +++ b/k8s-pb-codegen/out/api.apps.v1beta2.rs @@ -785,4 +785,3 @@ pub struct StatefulSetUpdateStrategy { #[prost(message, optional, tag="2")] pub rolling_update: ::core::option::Option, } -// didn't find apps/v1beta2 \ No newline at end of file diff --git a/out/api.authentication.v1.rs b/k8s-pb-codegen/out/api.authentication.v1.rs similarity index 99% rename from out/api.authentication.v1.rs rename to k8s-pb-codegen/out/api.authentication.v1.rs index f247526..954c17f 100644 --- a/out/api.authentication.v1.rs +++ b/k8s-pb-codegen/out/api.authentication.v1.rs @@ -165,4 +165,3 @@ pub struct UserInfo { #[prost(map="string, message", tag="4")] pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ExtraValue>, } -// didn't find authentication/v1 \ No newline at end of file diff --git a/out/api.authentication.v1beta1.rs b/k8s-pb-codegen/out/api.authentication.v1beta1.rs similarity index 99% rename from out/api.authentication.v1beta1.rs rename to k8s-pb-codegen/out/api.authentication.v1beta1.rs index f8d6096..570b970 100644 --- a/out/api.authentication.v1beta1.rs +++ b/k8s-pb-codegen/out/api.authentication.v1beta1.rs @@ -93,4 +93,3 @@ pub struct UserInfo { #[prost(map="string, message", tag="4")] pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ExtraValue>, } -// didn't find authentication/v1beta1 \ No newline at end of file diff --git a/out/api.authorization.v1.rs b/k8s-pb-codegen/out/api.authorization.v1.rs similarity index 99% rename from out/api.authorization.v1.rs rename to k8s-pb-codegen/out/api.authorization.v1.rs index 7fb54ec..e349d9a 100644 --- a/out/api.authorization.v1.rs +++ b/k8s-pb-codegen/out/api.authorization.v1.rs @@ -263,4 +263,3 @@ pub struct SubjectRulesReviewStatus { #[prost(string, optional, tag="4")] pub evaluation_error: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find authorization/v1 \ No newline at end of file diff --git a/out/api.authorization.v1beta1.rs b/k8s-pb-codegen/out/api.authorization.v1beta1.rs similarity index 99% rename from out/api.authorization.v1beta1.rs rename to k8s-pb-codegen/out/api.authorization.v1beta1.rs index e05453d..e86ebf7 100644 --- a/out/api.authorization.v1beta1.rs +++ b/k8s-pb-codegen/out/api.authorization.v1beta1.rs @@ -263,4 +263,3 @@ pub struct SubjectRulesReviewStatus { #[prost(string, optional, tag="4")] pub evaluation_error: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find authorization/v1beta1 \ No newline at end of file diff --git a/out/api.autoscaling.v1.rs b/k8s-pb-codegen/out/api.autoscaling.v1.rs similarity index 94% rename from out/api.autoscaling.v1.rs rename to k8s-pb-codegen/out/api.autoscaling.v1.rs index 807e46a..56273f6 100644 --- a/out/api.autoscaling.v1.rs +++ b/k8s-pb-codegen/out/api.autoscaling.v1.rs @@ -482,23 +482,4 @@ pub struct ScaleStatus { #[prost(string, optional, tag="2")] pub selector: ::core::option::Option<::prost::alloc::string::String>, } -// NB: no-generics for api.autoscaling.v1/ContainerResourceMetricSource (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ContainerResourceMetricStatus (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/CrossVersionObjectReference (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ExternalMetricSource (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ExternalMetricStatus (not in autoscaling/v1) -// TODO generics for horizontalpodautoscalers autoscaling/v1 -// NB: no-generics for api.autoscaling.v1/HorizontalPodAutoscalerCondition (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/HorizontalPodAutoscalerSpec (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/HorizontalPodAutoscalerStatus (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/MetricSpec (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/MetricStatus (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ObjectMetricSource (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ObjectMetricStatus (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/PodsMetricSource (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/PodsMetricStatus (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ResourceMetricSource (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ResourceMetricStatus (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/Scale (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ScaleSpec (not in autoscaling/v1) -// NB: no-generics for api.autoscaling.v1/ScaleStatus (not in autoscaling/v1) \ No newline at end of file +// TODO generics for horizontalpodautoscalers autoscaling/v1 \ No newline at end of file diff --git a/out/api.autoscaling.v2beta1.rs b/k8s-pb-codegen/out/api.autoscaling.v2beta1.rs similarity index 94% rename from out/api.autoscaling.v2beta1.rs rename to k8s-pb-codegen/out/api.autoscaling.v2beta1.rs index d6341fd..5be4516 100644 --- a/out/api.autoscaling.v2beta1.rs +++ b/k8s-pb-codegen/out/api.autoscaling.v2beta1.rs @@ -459,20 +459,4 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="3")] pub current_average_value: ::core::option::Option, } -// NB: no-generics for api.autoscaling.v2beta1/ContainerResourceMetricSource (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ContainerResourceMetricStatus (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/CrossVersionObjectReference (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ExternalMetricSource (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ExternalMetricStatus (not in autoscaling/v2beta1) -// TODO generics for horizontalpodautoscalers autoscaling/v2beta1 -// NB: no-generics for api.autoscaling.v2beta1/HorizontalPodAutoscalerCondition (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/HorizontalPodAutoscalerSpec (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/HorizontalPodAutoscalerStatus (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/MetricSpec (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/MetricStatus (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ObjectMetricSource (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ObjectMetricStatus (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/PodsMetricSource (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/PodsMetricStatus (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ResourceMetricSource (not in autoscaling/v2beta1) -// NB: no-generics for api.autoscaling.v2beta1/ResourceMetricStatus (not in autoscaling/v2beta1) \ No newline at end of file +// TODO generics for horizontalpodautoscalers autoscaling/v2beta1 \ No newline at end of file diff --git a/out/api.autoscaling.v2beta2.rs b/k8s-pb-codegen/out/api.autoscaling.v2beta2.rs similarity index 92% rename from out/api.autoscaling.v2beta2.rs rename to k8s-pb-codegen/out/api.autoscaling.v2beta2.rs index e2cb981..4bc0e69 100644 --- a/out/api.autoscaling.v2beta2.rs +++ b/k8s-pb-codegen/out/api.autoscaling.v2beta2.rs @@ -483,26 +483,4 @@ pub struct ResourceMetricStatus { #[prost(message, optional, tag="2")] pub current: ::core::option::Option, } -// NB: no-generics for api.autoscaling.v2beta2/ContainerResourceMetricSource (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ContainerResourceMetricStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/CrossVersionObjectReference (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ExternalMetricSource (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ExternalMetricStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/HPAScalingPolicy (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/HPAScalingRules (not in autoscaling/v2beta2) -// TODO generics for horizontalpodautoscalers autoscaling/v2beta2 -// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerBehavior (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerCondition (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerSpec (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/HorizontalPodAutoscalerStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/MetricIdentifier (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/MetricSpec (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/MetricStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/MetricTarget (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/MetricValueStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ObjectMetricSource (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ObjectMetricStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/PodsMetricSource (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/PodsMetricStatus (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ResourceMetricSource (not in autoscaling/v2beta2) -// NB: no-generics for api.autoscaling.v2beta2/ResourceMetricStatus (not in autoscaling/v2beta2) \ No newline at end of file +// TODO generics for horizontalpodautoscalers autoscaling/v2beta2 \ No newline at end of file diff --git a/out/api.batch.v1.rs b/k8s-pb-codegen/out/api.batch.v1.rs similarity index 97% rename from out/api.batch.v1.rs rename to k8s-pb-codegen/out/api.batch.v1.rs index a544252..28a3a62 100644 --- a/out/api.batch.v1.rs +++ b/k8s-pb-codegen/out/api.batch.v1.rs @@ -349,11 +349,4 @@ pub struct UncountedTerminatedPods { pub failed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } // TODO generics for cronjobs batch/v1 -// NB: no-generics for api.batch.v1/CronJobSpec (not in batch/v1) -// NB: no-generics for api.batch.v1/CronJobStatus (not in batch/v1) -// TODO generics for jobs batch/v1 -// NB: no-generics for api.batch.v1/JobCondition (not in batch/v1) -// NB: no-generics for api.batch.v1/JobSpec (not in batch/v1) -// NB: no-generics for api.batch.v1/JobStatus (not in batch/v1) -// NB: no-generics for api.batch.v1/JobTemplateSpec (not in batch/v1) -// NB: no-generics for api.batch.v1/UncountedTerminatedPods (not in batch/v1) \ No newline at end of file +// TODO generics for jobs batch/v1 \ No newline at end of file diff --git a/out/api.batch.v1beta1.rs b/k8s-pb-codegen/out/api.batch.v1beta1.rs similarity index 94% rename from out/api.batch.v1beta1.rs rename to k8s-pb-codegen/out/api.batch.v1beta1.rs index 6b818ee..55901bc 100644 --- a/out/api.batch.v1beta1.rs +++ b/k8s-pb-codegen/out/api.batch.v1beta1.rs @@ -114,8 +114,4 @@ pub struct JobTemplateSpec { #[prost(message, optional, tag="2")] pub spec: ::core::option::Option, } -// TODO generics for cronjobs batch/v1beta1 -// NB: no-generics for api.batch.v1beta1/CronJobSpec (not in batch/v1beta1) -// NB: no-generics for api.batch.v1beta1/CronJobStatus (not in batch/v1beta1) -// NB: no-generics for api.batch.v1beta1/JobTemplate (not in batch/v1beta1) -// NB: no-generics for api.batch.v1beta1/JobTemplateSpec (not in batch/v1beta1) \ No newline at end of file +// TODO generics for cronjobs batch/v1beta1 \ No newline at end of file diff --git a/out/api.certificates.v1.rs b/k8s-pb-codegen/out/api.certificates.v1.rs similarity index 99% rename from out/api.certificates.v1.rs rename to k8s-pb-codegen/out/api.certificates.v1.rs index 66cba4b..f80f2f2 100644 --- a/out/api.certificates.v1.rs +++ b/k8s-pb-codegen/out/api.certificates.v1.rs @@ -223,4 +223,3 @@ pub struct ExtraValue { #[prost(string, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -// didn't find certificates/v1 \ No newline at end of file diff --git a/out/api.certificates.v1beta1.rs b/k8s-pb-codegen/out/api.certificates.v1beta1.rs similarity index 99% rename from out/api.certificates.v1beta1.rs rename to k8s-pb-codegen/out/api.certificates.v1beta1.rs index 7e53a40..d93150f 100644 --- a/out/api.certificates.v1beta1.rs +++ b/k8s-pb-codegen/out/api.certificates.v1beta1.rs @@ -174,4 +174,3 @@ pub struct ExtraValue { #[prost(string, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -// didn't find certificates/v1beta1 \ No newline at end of file diff --git a/out/api.coordination.v1.rs b/k8s-pb-codegen/out/api.coordination.v1.rs similarity index 98% rename from out/api.coordination.v1.rs rename to k8s-pb-codegen/out/api.coordination.v1.rs index 12897df..6ace99f 100644 --- a/out/api.coordination.v1.rs +++ b/k8s-pb-codegen/out/api.coordination.v1.rs @@ -51,4 +51,3 @@ pub struct LeaseSpec { #[prost(int32, optional, tag="5")] pub lease_transitions: ::core::option::Option, } -// didn't find coordination/v1 \ No newline at end of file diff --git a/out/api.coordination.v1beta1.rs b/k8s-pb-codegen/out/api.coordination.v1beta1.rs similarity index 98% rename from out/api.coordination.v1beta1.rs rename to k8s-pb-codegen/out/api.coordination.v1beta1.rs index 56b51bc..6ace99f 100644 --- a/out/api.coordination.v1beta1.rs +++ b/k8s-pb-codegen/out/api.coordination.v1beta1.rs @@ -51,4 +51,3 @@ pub struct LeaseSpec { #[prost(int32, optional, tag="5")] pub lease_transitions: ::core::option::Option, } -// didn't find coordination/v1beta1 \ No newline at end of file diff --git a/out/api.core.v1.rs b/k8s-pb-codegen/out/api.core.v1.rs similarity index 99% rename from out/api.core.v1.rs rename to k8s-pb-codegen/out/api.core.v1.rs index 90c9204..8a6f463 100644 --- a/out/api.core.v1.rs +++ b/k8s-pb-codegen/out/api.core.v1.rs @@ -5824,4 +5824,3 @@ pub struct WindowsSecurityContextOptions { #[prost(bool, optional, tag="4")] pub host_process: ::core::option::Option, } -// didn't find core/v1 \ No newline at end of file diff --git a/out/api.discovery.v1.rs b/k8s-pb-codegen/out/api.discovery.v1.rs similarity index 99% rename from out/api.discovery.v1.rs rename to k8s-pb-codegen/out/api.discovery.v1.rs index 271a611..e38db1f 100644 --- a/out/api.discovery.v1.rs +++ b/k8s-pb-codegen/out/api.discovery.v1.rs @@ -171,4 +171,3 @@ pub struct ForZone { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find discovery/v1 \ No newline at end of file diff --git a/out/api.discovery.v1beta1.rs b/k8s-pb-codegen/out/api.discovery.v1beta1.rs similarity index 99% rename from out/api.discovery.v1beta1.rs rename to k8s-pb-codegen/out/api.discovery.v1beta1.rs index 14e121d..359d20c 100644 --- a/out/api.discovery.v1beta1.rs +++ b/k8s-pb-codegen/out/api.discovery.v1beta1.rs @@ -174,4 +174,3 @@ pub struct ForZone { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find discovery/v1beta1 \ No newline at end of file diff --git a/out/api.events.v1.rs b/k8s-pb-codegen/out/api.events.v1.rs similarity index 99% rename from out/api.events.v1.rs rename to k8s-pb-codegen/out/api.events.v1.rs index eab79bf..ccfd902 100644 --- a/out/api.events.v1.rs +++ b/k8s-pb-codegen/out/api.events.v1.rs @@ -98,4 +98,3 @@ pub struct EventSeries { #[prost(message, optional, tag="2")] pub last_observed_time: ::core::option::Option, } -// didn't find events/v1 \ No newline at end of file diff --git a/out/api.events.v1beta1.rs b/k8s-pb-codegen/out/api.events.v1beta1.rs similarity index 99% rename from out/api.events.v1beta1.rs rename to k8s-pb-codegen/out/api.events.v1beta1.rs index 4ad8872..93862d4 100644 --- a/out/api.events.v1beta1.rs +++ b/k8s-pb-codegen/out/api.events.v1beta1.rs @@ -100,4 +100,3 @@ pub struct EventSeries { #[prost(message, optional, tag="2")] pub last_observed_time: ::core::option::Option, } -// didn't find events/v1beta1 \ No newline at end of file diff --git a/out/api.extensions.v1beta1.rs b/k8s-pb-codegen/out/api.extensions.v1beta1.rs similarity index 99% rename from out/api.extensions.v1beta1.rs rename to k8s-pb-codegen/out/api.extensions.v1beta1.rs index 750fa90..c861ba2 100644 --- a/out/api.extensions.v1beta1.rs +++ b/k8s-pb-codegen/out/api.extensions.v1beta1.rs @@ -1295,4 +1295,3 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } -// didn't find extensions/v1beta1 \ No newline at end of file diff --git a/out/api.flowcontrol.v1alpha1.rs b/k8s-pb-codegen/out/api.flowcontrol.v1alpha1.rs similarity index 99% rename from out/api.flowcontrol.v1alpha1.rs rename to k8s-pb-codegen/out/api.flowcontrol.v1alpha1.rs index ceebf44..004c295 100644 --- a/out/api.flowcontrol.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.flowcontrol.v1alpha1.rs @@ -428,4 +428,3 @@ pub struct UserSubject { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find flowcontrol/v1alpha1 \ No newline at end of file diff --git a/out/api.flowcontrol.v1beta1.rs b/k8s-pb-codegen/out/api.flowcontrol.v1beta1.rs similarity index 99% rename from out/api.flowcontrol.v1beta1.rs rename to k8s-pb-codegen/out/api.flowcontrol.v1beta1.rs index f4d9a98..004c295 100644 --- a/out/api.flowcontrol.v1beta1.rs +++ b/k8s-pb-codegen/out/api.flowcontrol.v1beta1.rs @@ -428,4 +428,3 @@ pub struct UserSubject { #[prost(string, optional, tag="1")] pub name: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find flowcontrol/v1beta1 \ No newline at end of file diff --git a/out/api.imagepolicy.v1alpha1.rs b/k8s-pb-codegen/out/api.imagepolicy.v1alpha1.rs similarity index 98% rename from out/api.imagepolicy.v1alpha1.rs rename to k8s-pb-codegen/out/api.imagepolicy.v1alpha1.rs index be9edcc..96425b6 100644 --- a/out/api.imagepolicy.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.imagepolicy.v1alpha1.rs @@ -60,4 +60,3 @@ pub struct ImageReviewStatus { #[prost(map="string, string", tag="3")] pub audit_annotations: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -// didn't find imagepolicy/v1alpha1 \ No newline at end of file diff --git a/out/api.networking.v1.rs b/k8s-pb-codegen/out/api.networking.v1.rs similarity index 99% rename from out/api.networking.v1.rs rename to k8s-pb-codegen/out/api.networking.v1.rs index 23294f4..a221ef8 100644 --- a/out/api.networking.v1.rs +++ b/k8s-pb-codegen/out/api.networking.v1.rs @@ -494,4 +494,3 @@ pub struct ServiceBackendPort { #[prost(int32, optional, tag="2")] pub number: ::core::option::Option, } -// didn't find networking/v1 \ No newline at end of file diff --git a/out/api.networking.v1beta1.rs b/k8s-pb-codegen/out/api.networking.v1beta1.rs similarity index 99% rename from out/api.networking.v1beta1.rs rename to k8s-pb-codegen/out/api.networking.v1beta1.rs index 8afb5c2..57cde53 100644 --- a/out/api.networking.v1beta1.rs +++ b/k8s-pb-codegen/out/api.networking.v1beta1.rs @@ -285,4 +285,3 @@ pub struct IngressTls { #[prost(string, optional, tag="2")] pub secret_name: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find networking/v1beta1 \ No newline at end of file diff --git a/out/api.node.v1.rs b/k8s-pb-codegen/out/api.node.v1.rs similarity index 99% rename from out/api.node.v1.rs rename to k8s-pb-codegen/out/api.node.v1.rs index 23a2f63..88cb437 100644 --- a/out/api.node.v1.rs +++ b/k8s-pb-codegen/out/api.node.v1.rs @@ -80,4 +80,3 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } -// didn't find node/v1 \ No newline at end of file diff --git a/out/api.node.v1alpha1.rs b/k8s-pb-codegen/out/api.node.v1alpha1.rs similarity index 99% rename from out/api.node.v1alpha1.rs rename to k8s-pb-codegen/out/api.node.v1alpha1.rs index cd59c24..870c96c 100644 --- a/out/api.node.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.node.v1alpha1.rs @@ -90,4 +90,3 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } -// didn't find node/v1alpha1 \ No newline at end of file diff --git a/out/api.node.v1beta1.rs b/k8s-pb-codegen/out/api.node.v1beta1.rs similarity index 99% rename from out/api.node.v1beta1.rs rename to k8s-pb-codegen/out/api.node.v1beta1.rs index 7a140fe..d90936b 100644 --- a/out/api.node.v1beta1.rs +++ b/k8s-pb-codegen/out/api.node.v1beta1.rs @@ -79,4 +79,3 @@ pub struct Scheduling { #[prost(message, repeated, tag="2")] pub tolerations: ::prost::alloc::vec::Vec, } -// didn't find node/v1beta1 \ No newline at end of file diff --git a/out/api.policy.v1.rs b/k8s-pb-codegen/out/api.policy.v1.rs similarity index 96% rename from out/api.policy.v1.rs rename to k8s-pb-codegen/out/api.policy.v1.rs index b8738f3..f689e80 100644 --- a/out/api.policy.v1.rs +++ b/k8s-pb-codegen/out/api.policy.v1.rs @@ -123,7 +123,4 @@ pub struct PodDisruptionBudgetStatus { #[prost(message, repeated, tag="7")] pub conditions: ::prost::alloc::vec::Vec, } -// NB: no-generics for api.policy.v1/Eviction (not in policy/v1) -// TODO generics for poddisruptionbudgets policy/v1 -// NB: no-generics for api.policy.v1/PodDisruptionBudgetSpec (not in policy/v1) -// NB: no-generics for api.policy.v1/PodDisruptionBudgetStatus (not in policy/v1) \ No newline at end of file +// TODO generics for poddisruptionbudgets policy/v1 \ No newline at end of file diff --git a/out/api.policy.v1beta1.rs b/k8s-pb-codegen/out/api.policy.v1beta1.rs similarity index 94% rename from out/api.policy.v1beta1.rs rename to k8s-pb-codegen/out/api.policy.v1beta1.rs index fc6e027..d5957bd 100644 --- a/out/api.policy.v1beta1.rs +++ b/k8s-pb-codegen/out/api.policy.v1beta1.rs @@ -415,20 +415,5 @@ pub struct SupplementalGroupsStrategyOptions { #[prost(message, repeated, tag="2")] pub ranges: ::prost::alloc::vec::Vec, } -// NB: no-generics for api.policy.v1beta1/AllowedCSIDriver (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/AllowedFlexVolume (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/AllowedHostPath (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/Eviction (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/FSGroupStrategyOptions (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/HostPortRange (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/IDRange (not in policy/v1beta1) // TODO generics for poddisruptionbudgets policy/v1beta1 -// NB: no-generics for api.policy.v1beta1/PodDisruptionBudgetSpec (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/PodDisruptionBudgetStatus (not in policy/v1beta1) -// TODO generics for podsecuritypolicies policy/v1beta1 -// NB: no-generics for api.policy.v1beta1/PodSecurityPolicySpec (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/RunAsGroupStrategyOptions (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/RunAsUserStrategyOptions (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/RuntimeClassStrategyOptions (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/SELinuxStrategyOptions (not in policy/v1beta1) -// NB: no-generics for api.policy.v1beta1/SupplementalGroupsStrategyOptions (not in policy/v1beta1) \ No newline at end of file +// TODO generics for podsecuritypolicies policy/v1beta1 \ No newline at end of file diff --git a/out/api.rbac.v1.rs b/k8s-pb-codegen/out/api.rbac.v1.rs similarity index 99% rename from out/api.rbac.v1.rs rename to k8s-pb-codegen/out/api.rbac.v1.rs index 9ec9cc2..cc0b323 100644 --- a/out/api.rbac.v1.rs +++ b/k8s-pb-codegen/out/api.rbac.v1.rs @@ -181,4 +181,3 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find rbac/v1 \ No newline at end of file diff --git a/out/api.rbac.v1alpha1.rs b/k8s-pb-codegen/out/api.rbac.v1alpha1.rs similarity index 99% rename from out/api.rbac.v1alpha1.rs rename to k8s-pb-codegen/out/api.rbac.v1alpha1.rs index b9571e1..c186796 100644 --- a/out/api.rbac.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.rbac.v1alpha1.rs @@ -188,4 +188,3 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find rbac/v1alpha1 \ No newline at end of file diff --git a/out/api.rbac.v1beta1.rs b/k8s-pb-codegen/out/api.rbac.v1beta1.rs similarity index 99% rename from out/api.rbac.v1beta1.rs rename to k8s-pb-codegen/out/api.rbac.v1beta1.rs index 01bd69c..6014d60 100644 --- a/out/api.rbac.v1beta1.rs +++ b/k8s-pb-codegen/out/api.rbac.v1beta1.rs @@ -188,4 +188,3 @@ pub struct Subject { #[prost(string, optional, tag="4")] pub namespace: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find rbac/v1beta1 \ No newline at end of file diff --git a/out/api.scheduling.v1.rs b/k8s-pb-codegen/out/api.scheduling.v1.rs similarity index 98% rename from out/api.scheduling.v1.rs rename to k8s-pb-codegen/out/api.scheduling.v1.rs index 1a57f95..31913ca 100644 --- a/out/api.scheduling.v1.rs +++ b/k8s-pb-codegen/out/api.scheduling.v1.rs @@ -44,4 +44,3 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// didn't find scheduling/v1 \ No newline at end of file diff --git a/out/api.scheduling.v1alpha1.rs b/k8s-pb-codegen/out/api.scheduling.v1alpha1.rs similarity index 98% rename from out/api.scheduling.v1alpha1.rs rename to k8s-pb-codegen/out/api.scheduling.v1alpha1.rs index c55f16e..6001386 100644 --- a/out/api.scheduling.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.scheduling.v1alpha1.rs @@ -45,4 +45,3 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// didn't find scheduling/v1alpha1 \ No newline at end of file diff --git a/out/api.scheduling.v1beta1.rs b/k8s-pb-codegen/out/api.scheduling.v1beta1.rs similarity index 98% rename from out/api.scheduling.v1beta1.rs rename to k8s-pb-codegen/out/api.scheduling.v1beta1.rs index 5b9b009..6001386 100644 --- a/out/api.scheduling.v1beta1.rs +++ b/k8s-pb-codegen/out/api.scheduling.v1beta1.rs @@ -45,4 +45,3 @@ pub struct PriorityClassList { #[prost(message, repeated, tag="2")] pub items: ::prost::alloc::vec::Vec, } -// didn't find scheduling/v1beta1 \ No newline at end of file diff --git a/out/api.storage.v1.rs b/k8s-pb-codegen/out/api.storage.v1.rs similarity index 99% rename from out/api.storage.v1.rs rename to k8s-pb-codegen/out/api.storage.v1.rs index 9583977..6defaef 100644 --- a/out/api.storage.v1.rs +++ b/k8s-pb-codegen/out/api.storage.v1.rs @@ -446,4 +446,3 @@ pub struct VolumeNodeResources { #[prost(int32, optional, tag="1")] pub count: ::core::option::Option, } -// didn't find storage/v1 \ No newline at end of file diff --git a/out/api.storage.v1alpha1.rs b/k8s-pb-codegen/out/api.storage.v1alpha1.rs similarity index 99% rename from out/api.storage.v1alpha1.rs rename to k8s-pb-codegen/out/api.storage.v1alpha1.rs index 4d57010..93de6a0 100644 --- a/out/api.storage.v1alpha1.rs +++ b/k8s-pb-codegen/out/api.storage.v1alpha1.rs @@ -201,4 +201,3 @@ pub struct VolumeError { #[prost(string, optional, tag="2")] pub message: ::core::option::Option<::prost::alloc::string::String>, } -// didn't find storage/v1alpha1 \ No newline at end of file diff --git a/out/api.storage.v1beta1.rs b/k8s-pb-codegen/out/api.storage.v1beta1.rs similarity index 99% rename from out/api.storage.v1beta1.rs rename to k8s-pb-codegen/out/api.storage.v1beta1.rs index 7238bc7..54a447e 100644 --- a/out/api.storage.v1beta1.rs +++ b/k8s-pb-codegen/out/api.storage.v1beta1.rs @@ -540,4 +540,3 @@ pub struct VolumeNodeResources { #[prost(int32, optional, tag="1")] pub count: ::core::option::Option, } -// didn't find storage/v1beta1 \ No newline at end of file diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs b/k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs similarity index 100% rename from out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs rename to k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1.rs diff --git a/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs b/k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs similarity index 100% rename from out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs rename to k8s-pb-codegen/out/apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.rs diff --git a/out/apimachinery.pkg.api.resource.rs b/k8s-pb-codegen/out/apimachinery.pkg.api.resource.rs similarity index 100% rename from out/apimachinery.pkg.api.resource.rs rename to k8s-pb-codegen/out/apimachinery.pkg.api.resource.rs diff --git a/out/apimachinery.pkg.apis.meta.v1.rs b/k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1.rs similarity index 100% rename from out/apimachinery.pkg.apis.meta.v1.rs rename to k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1.rs diff --git a/out/apimachinery.pkg.apis.meta.v1beta1.rs b/k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1beta1.rs similarity index 100% rename from out/apimachinery.pkg.apis.meta.v1beta1.rs rename to k8s-pb-codegen/out/apimachinery.pkg.apis.meta.v1beta1.rs diff --git a/out/apimachinery.pkg.apis.testapigroup.v1.rs b/k8s-pb-codegen/out/apimachinery.pkg.apis.testapigroup.v1.rs similarity index 100% rename from out/apimachinery.pkg.apis.testapigroup.v1.rs rename to k8s-pb-codegen/out/apimachinery.pkg.apis.testapigroup.v1.rs diff --git a/out/apimachinery.pkg.runtime.rs b/k8s-pb-codegen/out/apimachinery.pkg.runtime.rs similarity index 100% rename from out/apimachinery.pkg.runtime.rs rename to k8s-pb-codegen/out/apimachinery.pkg.runtime.rs diff --git a/out/apimachinery.pkg.runtime.schema.rs b/k8s-pb-codegen/out/apimachinery.pkg.runtime.schema.rs similarity index 100% rename from out/apimachinery.pkg.runtime.schema.rs rename to k8s-pb-codegen/out/apimachinery.pkg.runtime.schema.rs diff --git a/out/apimachinery.pkg.util.intstr.rs b/k8s-pb-codegen/out/apimachinery.pkg.util.intstr.rs similarity index 100% rename from out/apimachinery.pkg.util.intstr.rs rename to k8s-pb-codegen/out/apimachinery.pkg.util.intstr.rs diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1.rs b/k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1.rs similarity index 100% rename from out/kube_aggregator.pkg.apis.apiregistration.v1.rs rename to k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1.rs diff --git a/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs b/k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs similarity index 100% rename from out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs rename to k8s-pb-codegen/out/kube_aggregator.pkg.apis.apiregistration.v1beta1.rs diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta1.rs similarity index 100% rename from out/metrics.pkg.apis.custom_metrics.v1beta1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta1.rs diff --git a/out/metrics.pkg.apis.custom_metrics.v1beta2.rs b/k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta2.rs similarity index 100% rename from out/metrics.pkg.apis.custom_metrics.v1beta2.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.custom_metrics.v1beta2.rs diff --git a/out/metrics.pkg.apis.external_metrics.v1beta1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.external_metrics.v1beta1.rs similarity index 100% rename from out/metrics.pkg.apis.external_metrics.v1beta1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.external_metrics.v1beta1.rs diff --git a/out/metrics.pkg.apis.metrics.v1alpha1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1alpha1.rs similarity index 100% rename from out/metrics.pkg.apis.metrics.v1alpha1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1alpha1.rs diff --git a/out/metrics.pkg.apis.metrics.v1beta1.rs b/k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1beta1.rs similarity index 100% rename from out/metrics.pkg.apis.metrics.v1beta1.rs rename to k8s-pb-codegen/out/metrics.pkg.apis.metrics.v1beta1.rs diff --git a/k8s-pb-codegen/pbcodegen.rs b/k8s-pb-codegen/pbcodegen.rs new file mode 100644 index 0000000..97c8ae2 --- /dev/null +++ b/k8s-pb-codegen/pbcodegen.rs @@ -0,0 +1,86 @@ +use prost::Message; +use prost_types::{FileDescriptorProto, FileDescriptorSet}; +#[macro_use] +extern crate log; +use anyhow::{Context, Result}; +use pbcodegen::*; +use std::{ + fs, + io::Write, + path::{Path, PathBuf}, +}; + +fn read_file>(path: P) -> Result { + Ok(fs::read_to_string(&path).with_context(|| format!("read {}", path.as_ref().display()))?) +} + +fn main() -> Result<()> { + std::env::set_var("RUST_LOG", "pbcodegen=info"); + env_logger::init(); + let root = Path::new(env!("CARGO_MANIFEST_DIR")); + info!("parsing protos.list in {}", root.display()); + + let proto_file: String = read_file(root.join("protos.list"))?; + let protos = proto_file.lines().collect::>(); + debug!("protos: {:?}", protos); + + info!("building protos"); + prost_build::Config::new() + // should probably switch to this + //.btree_map(&["."]) + .out_dir("./out") + .compile_protos(protos.as_slice(), &["protos/"])?; + + info!("loading api-resources"); + let apif: String = read_file(root.join("openapi/api-resources.json"))?; + let apis: Vec = + serde_json::from_str(&apif).with_context(|| "parse api-resources.json".to_string())?; + + let buf = + std::fs::read(root.join("protos.fds")).with_context(|| "read protos.fds".to_string())?; + let fds = FileDescriptorSet::decode(&*buf).unwrap(); // pulls in proto::Message + + // NB: FDS fields: https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a338e9afd7717d0f42ca9/prost-types/src/protobuf.rs#L1-L7 + // FDS usage: https://github.com/tokio-rs/prost/blob/32bc87cd0b7301f6af1a338e9afd7717d0f42ca9/prost-build/src/lib.rs#L765-L825 + for f in fds.file { + if let Some(pkg) = f.package { + let pkgpath = Path::new("./out").join(format!("{}.rs", pkg)); + // match the pkg name to a key in api-resources.json + info!("generating {}", pkg); + if let Some(apikey) = pkgname_to_api_key(&pkg) { + let mut codegen = vec![]; + // find the corresponding apiGroupVersion + if let Some(apigr) = apis.iter().find(|ag| ag.apiGroupVersion == apikey) { + for dp in f.message_type { + if let Some(name) = dp.name { + let children: Vec = + apigr.resources.iter().map(|gr| gr.kind.clone()).collect(); + info!(" - found {:?} in {}", children, apikey); + if name.ends_with("List") { + continue; + } + // find the inner resource with matching kind name + if let Some(api) = apigr.resources.iter().find(|gr| name == gr.kind) { + codegen.push(api.generics()); + } else { + debug!(" - no-generics for {}/{} (not in {})", pkg, name, apikey); + } + } + } + } else { + warn!("skipped: {} (didn't find {})", pkg, apikey); + } + let generics = codegen.join("\n"); + let mut file = fs::OpenOptions::new() + .write(true) + .append(true) + .open(&pkgpath)?; + file.write(generics.as_bytes())?; + } + } + } + + // Generate code in `src/` by reading files in `OUT_DIR`? + // Need to create `mod.rs` file for each level based on the filename, and write generated code in correct file. + Ok(()) +} diff --git a/protos.list b/k8s-pb-codegen/protos.list similarity index 100% rename from protos.list rename to k8s-pb-codegen/protos.list diff --git a/protos/api/admission/v1/generated.proto b/k8s-pb-codegen/protos/api/admission/v1/generated.proto similarity index 100% rename from protos/api/admission/v1/generated.proto rename to k8s-pb-codegen/protos/api/admission/v1/generated.proto diff --git a/protos/api/admission/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/admission/v1beta1/generated.proto similarity index 100% rename from protos/api/admission/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/admission/v1beta1/generated.proto diff --git a/protos/api/admissionregistration/v1/generated.proto b/k8s-pb-codegen/protos/api/admissionregistration/v1/generated.proto similarity index 100% rename from protos/api/admissionregistration/v1/generated.proto rename to k8s-pb-codegen/protos/api/admissionregistration/v1/generated.proto diff --git a/protos/api/admissionregistration/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/admissionregistration/v1beta1/generated.proto similarity index 100% rename from protos/api/admissionregistration/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/admissionregistration/v1beta1/generated.proto diff --git a/protos/api/apiserverinternal/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/apiserverinternal/v1alpha1/generated.proto similarity index 100% rename from protos/api/apiserverinternal/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/apiserverinternal/v1alpha1/generated.proto diff --git a/protos/api/apps/v1/generated.proto b/k8s-pb-codegen/protos/api/apps/v1/generated.proto similarity index 100% rename from protos/api/apps/v1/generated.proto rename to k8s-pb-codegen/protos/api/apps/v1/generated.proto diff --git a/protos/api/apps/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/apps/v1beta1/generated.proto similarity index 100% rename from protos/api/apps/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/apps/v1beta1/generated.proto diff --git a/protos/api/apps/v1beta2/generated.proto b/k8s-pb-codegen/protos/api/apps/v1beta2/generated.proto similarity index 100% rename from protos/api/apps/v1beta2/generated.proto rename to k8s-pb-codegen/protos/api/apps/v1beta2/generated.proto diff --git a/protos/api/authentication/v1/generated.proto b/k8s-pb-codegen/protos/api/authentication/v1/generated.proto similarity index 100% rename from protos/api/authentication/v1/generated.proto rename to k8s-pb-codegen/protos/api/authentication/v1/generated.proto diff --git a/protos/api/authentication/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/authentication/v1beta1/generated.proto similarity index 100% rename from protos/api/authentication/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/authentication/v1beta1/generated.proto diff --git a/protos/api/authorization/v1/generated.proto b/k8s-pb-codegen/protos/api/authorization/v1/generated.proto similarity index 100% rename from protos/api/authorization/v1/generated.proto rename to k8s-pb-codegen/protos/api/authorization/v1/generated.proto diff --git a/protos/api/authorization/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/authorization/v1beta1/generated.proto similarity index 100% rename from protos/api/authorization/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/authorization/v1beta1/generated.proto diff --git a/protos/api/autoscaling/v1/generated.proto b/k8s-pb-codegen/protos/api/autoscaling/v1/generated.proto similarity index 100% rename from protos/api/autoscaling/v1/generated.proto rename to k8s-pb-codegen/protos/api/autoscaling/v1/generated.proto diff --git a/protos/api/autoscaling/v2beta1/generated.proto b/k8s-pb-codegen/protos/api/autoscaling/v2beta1/generated.proto similarity index 100% rename from protos/api/autoscaling/v2beta1/generated.proto rename to k8s-pb-codegen/protos/api/autoscaling/v2beta1/generated.proto diff --git a/protos/api/autoscaling/v2beta2/generated.proto b/k8s-pb-codegen/protos/api/autoscaling/v2beta2/generated.proto similarity index 100% rename from protos/api/autoscaling/v2beta2/generated.proto rename to k8s-pb-codegen/protos/api/autoscaling/v2beta2/generated.proto diff --git a/protos/api/batch/v1/generated.proto b/k8s-pb-codegen/protos/api/batch/v1/generated.proto similarity index 100% rename from protos/api/batch/v1/generated.proto rename to k8s-pb-codegen/protos/api/batch/v1/generated.proto diff --git a/protos/api/batch/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/batch/v1beta1/generated.proto similarity index 100% rename from protos/api/batch/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/batch/v1beta1/generated.proto diff --git a/protos/api/certificates/v1/generated.proto b/k8s-pb-codegen/protos/api/certificates/v1/generated.proto similarity index 100% rename from protos/api/certificates/v1/generated.proto rename to k8s-pb-codegen/protos/api/certificates/v1/generated.proto diff --git a/protos/api/certificates/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/certificates/v1beta1/generated.proto similarity index 100% rename from protos/api/certificates/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/certificates/v1beta1/generated.proto diff --git a/protos/api/coordination/v1/generated.proto b/k8s-pb-codegen/protos/api/coordination/v1/generated.proto similarity index 100% rename from protos/api/coordination/v1/generated.proto rename to k8s-pb-codegen/protos/api/coordination/v1/generated.proto diff --git a/protos/api/coordination/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/coordination/v1beta1/generated.proto similarity index 100% rename from protos/api/coordination/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/coordination/v1beta1/generated.proto diff --git a/protos/api/core/v1/generated.proto b/k8s-pb-codegen/protos/api/core/v1/generated.proto similarity index 100% rename from protos/api/core/v1/generated.proto rename to k8s-pb-codegen/protos/api/core/v1/generated.proto diff --git a/protos/api/discovery/v1/generated.proto b/k8s-pb-codegen/protos/api/discovery/v1/generated.proto similarity index 100% rename from protos/api/discovery/v1/generated.proto rename to k8s-pb-codegen/protos/api/discovery/v1/generated.proto diff --git a/protos/api/discovery/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/discovery/v1beta1/generated.proto similarity index 100% rename from protos/api/discovery/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/discovery/v1beta1/generated.proto diff --git a/protos/api/events/v1/generated.proto b/k8s-pb-codegen/protos/api/events/v1/generated.proto similarity index 100% rename from protos/api/events/v1/generated.proto rename to k8s-pb-codegen/protos/api/events/v1/generated.proto diff --git a/protos/api/events/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/events/v1beta1/generated.proto similarity index 100% rename from protos/api/events/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/events/v1beta1/generated.proto diff --git a/protos/api/extensions/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/extensions/v1beta1/generated.proto similarity index 100% rename from protos/api/extensions/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/extensions/v1beta1/generated.proto diff --git a/protos/api/flowcontrol/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/flowcontrol/v1alpha1/generated.proto similarity index 100% rename from protos/api/flowcontrol/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/flowcontrol/v1alpha1/generated.proto diff --git a/protos/api/flowcontrol/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/flowcontrol/v1beta1/generated.proto similarity index 100% rename from protos/api/flowcontrol/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/flowcontrol/v1beta1/generated.proto diff --git a/protos/api/imagepolicy/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/imagepolicy/v1alpha1/generated.proto similarity index 100% rename from protos/api/imagepolicy/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/imagepolicy/v1alpha1/generated.proto diff --git a/protos/api/networking/v1/generated.proto b/k8s-pb-codegen/protos/api/networking/v1/generated.proto similarity index 100% rename from protos/api/networking/v1/generated.proto rename to k8s-pb-codegen/protos/api/networking/v1/generated.proto diff --git a/protos/api/networking/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/networking/v1beta1/generated.proto similarity index 100% rename from protos/api/networking/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/networking/v1beta1/generated.proto diff --git a/protos/api/node/v1/generated.proto b/k8s-pb-codegen/protos/api/node/v1/generated.proto similarity index 100% rename from protos/api/node/v1/generated.proto rename to k8s-pb-codegen/protos/api/node/v1/generated.proto diff --git a/protos/api/node/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/node/v1alpha1/generated.proto similarity index 100% rename from protos/api/node/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/node/v1alpha1/generated.proto diff --git a/protos/api/node/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/node/v1beta1/generated.proto similarity index 100% rename from protos/api/node/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/node/v1beta1/generated.proto diff --git a/protos/api/policy/v1/generated.proto b/k8s-pb-codegen/protos/api/policy/v1/generated.proto similarity index 100% rename from protos/api/policy/v1/generated.proto rename to k8s-pb-codegen/protos/api/policy/v1/generated.proto diff --git a/protos/api/policy/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/policy/v1beta1/generated.proto similarity index 100% rename from protos/api/policy/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/policy/v1beta1/generated.proto diff --git a/protos/api/rbac/v1/generated.proto b/k8s-pb-codegen/protos/api/rbac/v1/generated.proto similarity index 100% rename from protos/api/rbac/v1/generated.proto rename to k8s-pb-codegen/protos/api/rbac/v1/generated.proto diff --git a/protos/api/rbac/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/rbac/v1alpha1/generated.proto similarity index 100% rename from protos/api/rbac/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/rbac/v1alpha1/generated.proto diff --git a/protos/api/rbac/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/rbac/v1beta1/generated.proto similarity index 100% rename from protos/api/rbac/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/rbac/v1beta1/generated.proto diff --git a/protos/api/scheduling/v1/generated.proto b/k8s-pb-codegen/protos/api/scheduling/v1/generated.proto similarity index 100% rename from protos/api/scheduling/v1/generated.proto rename to k8s-pb-codegen/protos/api/scheduling/v1/generated.proto diff --git a/protos/api/scheduling/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/scheduling/v1alpha1/generated.proto similarity index 100% rename from protos/api/scheduling/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/scheduling/v1alpha1/generated.proto diff --git a/protos/api/scheduling/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/scheduling/v1beta1/generated.proto similarity index 100% rename from protos/api/scheduling/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/scheduling/v1beta1/generated.proto diff --git a/protos/api/storage/v1/generated.proto b/k8s-pb-codegen/protos/api/storage/v1/generated.proto similarity index 100% rename from protos/api/storage/v1/generated.proto rename to k8s-pb-codegen/protos/api/storage/v1/generated.proto diff --git a/protos/api/storage/v1alpha1/generated.proto b/k8s-pb-codegen/protos/api/storage/v1alpha1/generated.proto similarity index 100% rename from protos/api/storage/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/api/storage/v1alpha1/generated.proto diff --git a/protos/api/storage/v1beta1/generated.proto b/k8s-pb-codegen/protos/api/storage/v1beta1/generated.proto similarity index 100% rename from protos/api/storage/v1beta1/generated.proto rename to k8s-pb-codegen/protos/api/storage/v1beta1/generated.proto diff --git a/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto similarity index 100% rename from protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto rename to k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto diff --git a/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto similarity index 100% rename from protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto rename to k8s-pb-codegen/protos/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto diff --git a/protos/apimachinery/pkg/api/resource/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/api/resource/generated.proto similarity index 100% rename from protos/apimachinery/pkg/api/resource/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/api/resource/generated.proto diff --git a/protos/apimachinery/pkg/apis/meta/v1/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1/generated.proto similarity index 100% rename from protos/apimachinery/pkg/apis/meta/v1/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1/generated.proto diff --git a/protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto similarity index 100% rename from protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/apis/meta/v1beta1/generated.proto diff --git a/protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto similarity index 100% rename from protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/apis/testapigroup/v1/generated.proto diff --git a/protos/apimachinery/pkg/runtime/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/runtime/generated.proto similarity index 100% rename from protos/apimachinery/pkg/runtime/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/runtime/generated.proto diff --git a/protos/apimachinery/pkg/runtime/schema/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/runtime/schema/generated.proto similarity index 100% rename from protos/apimachinery/pkg/runtime/schema/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/runtime/schema/generated.proto diff --git a/protos/apimachinery/pkg/util/intstr/generated.proto b/k8s-pb-codegen/protos/apimachinery/pkg/util/intstr/generated.proto similarity index 100% rename from protos/apimachinery/pkg/util/intstr/generated.proto rename to k8s-pb-codegen/protos/apimachinery/pkg/util/intstr/generated.proto diff --git a/protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto b/k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto similarity index 100% rename from protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto rename to k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto diff --git a/protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto b/k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto similarity index 100% rename from protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto rename to k8s-pb-codegen/protos/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto diff --git a/protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto diff --git a/protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto diff --git a/protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/external_metrics/v1beta1/generated.proto diff --git a/protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1alpha1/generated.proto diff --git a/protos/metrics/pkg/apis/metrics/v1beta1/generated.proto b/k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1beta1/generated.proto similarity index 100% rename from protos/metrics/pkg/apis/metrics/v1beta1/generated.proto rename to k8s-pb-codegen/protos/metrics/pkg/apis/metrics/v1beta1/generated.proto diff --git a/k8s-pb-codegen/src/lib.rs b/k8s-pb-codegen/src/lib.rs new file mode 100644 index 0000000..5fcf16b --- /dev/null +++ b/k8s-pb-codegen/src/lib.rs @@ -0,0 +1,65 @@ +// codify structs in api-resource.json +// this is the root struct (we have a vector of them) +#[derive(serde::Deserialize)] +pub struct GenApiGroupResources { + pub apiGroupVersion: String, + pub resources: Vec, +} +// main resource struct +#[derive(serde::Deserialize)] +pub struct GenApiResource { + /// plural name + pub name: String, + #[serde(default)] + pub namespaced: bool, + pub subresource: bool, + /// apigroup/ver + pub apiGroupVersion: String, + /// apigroup + pub group: String, + /// ver + pub version: String, + pub kind: String, + /// expected module path :: delimited + pub rust: String, + /// allowed verbs + pub verbs: Vec, + pub scopedVerbs: ScopedVerbs, + /// vec of found root paths + /// + /// "/apis/apps/v1/controllerrevisions", + /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", + /// "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" + pub paths: Vec, +} +#[derive(serde::Deserialize)] +pub struct ScopedVerbs { + #[serde(default)] + pub all: Vec, + #[serde(default)] + pub namespaced: Vec, +} + +impl GenApiResource { + pub fn generics(&self) -> String { + // TODO: use codegen crate here ? + format!("// generics for {} {}", self.name, self.apiGroupVersion) + } +} + +pub fn pkgname_to_api_key(pkg: &str) -> Option { + // TODO: this function is dumb. we probably need to have a better key in the root object than apiGroupVersion + // otherwise we'd have to match up weird paths like api.storage.v1 -> storage.k8s.io/v1 + if let Some((catpth, ver)) = pkg.rsplit_once(".") { + if let Some((category, pth)) = catpth.split_once(".") { + match category { + "api" => Some(format!("{}/{}", pth, ver)), + _ => None, + } + } else { + None + } + } else { + None + } +} diff --git a/k8s-pb/Cargo.toml b/k8s-pb/Cargo.toml new file mode 100644 index 0000000..f1584b2 --- /dev/null +++ b/k8s-pb/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "k8s-pb" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/k8s-pb/src/lib.rs b/k8s-pb/src/lib.rs new file mode 100644 index 0000000..31e1bb2 --- /dev/null +++ b/k8s-pb/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +} From e9815c36487419eda9b9f4d700526f9c9036917c Mon Sep 17 00:00:00 2001 From: kazk Date: Tue, 26 Oct 2021 23:15:06 -0700 Subject: [PATCH 10/16] 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 c19076fed0d9adcb2ee0743b30b1d588d311d415 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 00:37:17 -0700 Subject: [PATCH 11/16] 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 0fdf9194a57e308116485f4ea7f53f9ed2032835 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 01:46:31 -0700 Subject: [PATCH 12/16] Add `subresources` Signed-off-by: kazk --- k8s-pb-codegen/openapi/api-resources.json | 232 ++++++++++++++++++---- k8s-pb-codegen/openapi/list-resources.jq | 11 + 2 files changed, 200 insertions(+), 43 deletions(-) diff --git a/k8s-pb-codegen/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json index 234037c..0854097 100644 --- a/k8s-pb-codegen/openapi/api-resources.json +++ b/k8s-pb-codegen/openapi/api-resources.json @@ -38,7 +38,8 @@ "paths": [ "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations", "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" - ] + ], + "subresources": [] }, { "name": "validatingwebhookconfigurations", @@ -76,7 +77,8 @@ "paths": [ "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations", "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" - ] + ], + "subresources": [] } ] }, @@ -119,6 +121,9 @@ "paths": [ "/apis/apiextensions.k8s.io/v1/customresourcedefinitions", "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}" + ], + "subresources": [ + "status" ] }, { @@ -191,6 +196,9 @@ "paths": [ "/apis/apiregistration.k8s.io/v1/apiservices", "/apis/apiregistration.k8s.io/v1/apiservices/{name}" + ], + "subresources": [ + "status" ] }, { @@ -267,7 +275,8 @@ "/apis/apps/v1/controllerrevisions", "/apis/apps/v1/namespaces/{namespace}/controllerrevisions", "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}" - ] + ], + "subresources": [] }, { "name": "daemonsets", @@ -309,6 +318,9 @@ "/apis/apps/v1/daemonsets", "/apis/apps/v1/namespaces/{namespace}/daemonsets", "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}" + ], + "subresources": [ + "status" ] }, { @@ -380,6 +392,10 @@ "/apis/apps/v1/deployments", "/apis/apps/v1/namespaces/{namespace}/deployments", "/apis/apps/v1/namespaces/{namespace}/deployments/{name}" + ], + "subresources": [ + "scale", + "status" ] }, { @@ -480,6 +496,10 @@ "/apis/apps/v1/replicasets", "/apis/apps/v1/namespaces/{namespace}/replicasets", "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}" + ], + "subresources": [ + "scale", + "status" ] }, { @@ -580,6 +600,10 @@ "/apis/apps/v1/statefulsets", "/apis/apps/v1/namespaces/{namespace}/statefulsets", "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}" + ], + "subresources": [ + "scale", + "status" ] }, { @@ -668,7 +692,8 @@ }, "paths": [ "/apis/authentication.k8s.io/v1/tokenreviews" - ] + ], + "subresources": [] } ] }, @@ -698,7 +723,8 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews" - ] + ], + "subresources": [] }, { "name": "selfsubjectaccessreviews", @@ -723,7 +749,8 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews" - ] + ], + "subresources": [] }, { "name": "selfsubjectrulesreviews", @@ -748,7 +775,8 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews" - ] + ], + "subresources": [] }, { "name": "subjectaccessreviews", @@ -773,7 +801,8 @@ }, "paths": [ "/apis/authorization.k8s.io/v1/subjectaccessreviews" - ] + ], + "subresources": [] } ] }, @@ -820,6 +849,9 @@ "/apis/autoscaling/v1/horizontalpodautoscalers", "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + "status" ] }, { @@ -896,6 +928,9 @@ "/apis/autoscaling/v2beta1/horizontalpodautoscalers", "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + "status" ] }, { @@ -972,6 +1007,9 @@ "/apis/autoscaling/v2beta2/horizontalpodautoscalers", "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers", "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1048,6 +1086,9 @@ "/apis/batch/v1/cronjobs", "/apis/batch/v1/namespaces/{namespace}/cronjobs", "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1119,6 +1160,9 @@ "/apis/batch/v1/jobs", "/apis/batch/v1/namespaces/{namespace}/jobs", "/apis/batch/v1/namespaces/{namespace}/jobs/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1195,6 +1239,9 @@ "/apis/batch/v1beta1/cronjobs", "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs", "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1267,6 +1314,10 @@ "paths": [ "/apis/certificates.k8s.io/v1/certificatesigningrequests", "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}" + ], + "subresources": [ + "approval", + "status" ] }, { @@ -1372,7 +1423,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": [] } ] }, @@ -1419,7 +1471,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": [] } ] }, @@ -1466,7 +1519,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": [] } ] }, @@ -1513,7 +1567,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": [] } ] }, @@ -1560,7 +1615,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": [] } ] }, @@ -1603,6 +1659,9 @@ "paths": [ "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas", "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1670,6 +1729,9 @@ "paths": [ "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations", "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1742,6 +1804,9 @@ "paths": [ "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions", "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1814,7 +1879,8 @@ "paths": [ "/apis/networking.k8s.io/v1/ingressclasses", "/apis/networking.k8s.io/v1/ingressclasses/{name}" - ] + ], + "subresources": [] }, { "name": "ingresses", @@ -1856,6 +1922,9 @@ "/apis/networking.k8s.io/v1/ingresses", "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses", "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" + ], + "subresources": [ + "status" ] }, { @@ -1927,7 +1996,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": [] } ] }, @@ -1970,7 +2040,8 @@ "paths": [ "/apis/node.k8s.io/v1/runtimeclasses", "/apis/node.k8s.io/v1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2013,7 +2084,8 @@ "paths": [ "/apis/node.k8s.io/v1alpha1/runtimeclasses", "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2056,7 +2128,8 @@ "paths": [ "/apis/node.k8s.io/v1beta1/runtimeclasses", "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2103,6 +2176,9 @@ "/apis/policy/v1/poddisruptionbudgets", "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets", "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}" + ], + "subresources": [ + "status" ] }, { @@ -2179,6 +2255,9 @@ "/apis/policy/v1beta1/poddisruptionbudgets", "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets", "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}" + ], + "subresources": [ + "status" ] }, { @@ -2246,7 +2325,8 @@ "paths": [ "/apis/policy/v1beta1/podsecuritypolicies", "/apis/policy/v1beta1/podsecuritypolicies/{name}" - ] + ], + "subresources": [] } ] }, @@ -2289,7 +2369,8 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings", "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}" - ] + ], + "subresources": [] }, { "name": "clusterroles", @@ -2327,7 +2408,8 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1/clusterroles", "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}" - ] + ], + "subresources": [] }, { "name": "rolebindings", @@ -2369,7 +2451,8 @@ "/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", @@ -2411,7 +2494,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": [] } ] }, @@ -2454,7 +2538,8 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings", "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}" - ] + ], + "subresources": [] }, { "name": "clusterroles", @@ -2492,7 +2577,8 @@ "paths": [ "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles", "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}" - ] + ], + "subresources": [] }, { "name": "rolebindings", @@ -2534,7 +2620,8 @@ "/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", @@ -2576,7 +2663,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": [] } ] }, @@ -2619,7 +2707,8 @@ "paths": [ "/apis/scheduling.k8s.io/v1/priorityclasses", "/apis/scheduling.k8s.io/v1/priorityclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2662,7 +2751,8 @@ "paths": [ "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" - ] + ], + "subresources": [] } ] }, @@ -2705,7 +2795,8 @@ "paths": [ "/apis/storage.k8s.io/v1/csidrivers", "/apis/storage.k8s.io/v1/csidrivers/{name}" - ] + ], + "subresources": [] }, { "name": "csinodes", @@ -2743,7 +2834,8 @@ "paths": [ "/apis/storage.k8s.io/v1/csinodes", "/apis/storage.k8s.io/v1/csinodes/{name}" - ] + ], + "subresources": [] }, { "name": "storageclasses", @@ -2781,7 +2873,8 @@ "paths": [ "/apis/storage.k8s.io/v1/storageclasses", "/apis/storage.k8s.io/v1/storageclasses/{name}" - ] + ], + "subresources": [] }, { "name": "volumeattachments", @@ -2819,6 +2912,9 @@ "paths": [ "/apis/storage.k8s.io/v1/volumeattachments", "/apis/storage.k8s.io/v1/volumeattachments/{name}" + ], + "subresources": [ + "status" ] }, { @@ -2895,7 +2991,8 @@ "/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", @@ -2933,7 +3030,8 @@ "paths": [ "/apis/storage.k8s.io/v1alpha1/volumeattachments", "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" - ] + ], + "subresources": [] } ] }, @@ -2980,7 +3078,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": [] } ] }, @@ -3010,7 +3109,8 @@ }, "paths": [ "/api/v1/namespaces/{namespace}/bindings" - ] + ], + "subresources": [] }, { "name": "componentstatuses", @@ -3038,7 +3138,8 @@ "paths": [ "/api/v1/componentstatuses", "/api/v1/componentstatuses/{name}" - ] + ], + "subresources": [] }, { "name": "configmaps", @@ -3080,7 +3181,8 @@ "/api/v1/configmaps", "/api/v1/namespaces/{namespace}/configmaps", "/api/v1/namespaces/{namespace}/configmaps/{name}" - ] + ], + "subresources": [] }, { "name": "endpoints", @@ -3122,7 +3224,8 @@ "/api/v1/endpoints", "/api/v1/namespaces/{namespace}/endpoints", "/api/v1/namespaces/{namespace}/endpoints/{name}" - ] + ], + "subresources": [] }, { "name": "events", @@ -3164,7 +3267,8 @@ "/api/v1/events", "/api/v1/namespaces/{namespace}/events", "/api/v1/namespaces/{namespace}/events/{name}" - ] + ], + "subresources": [] }, { "name": "limitranges", @@ -3206,7 +3310,8 @@ "/api/v1/limitranges", "/api/v1/namespaces/{namespace}/limitranges", "/api/v1/namespaces/{namespace}/limitranges/{name}" - ] + ], + "subresources": [] }, { "name": "namespaces", @@ -3242,6 +3347,10 @@ "paths": [ "/api/v1/namespaces", "/api/v1/namespaces/{name}" + ], + "subresources": [ + "finalize", + "status" ] }, { @@ -3334,6 +3443,10 @@ "paths": [ "/api/v1/nodes", "/api/v1/nodes/{name}" + ], + "subresources": [ + "proxy", + "status" ] }, { @@ -3431,6 +3544,9 @@ "/api/v1/persistentvolumeclaims", "/api/v1/namespaces/{namespace}/persistentvolumeclaims", "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}" + ], + "subresources": [ + "status" ] }, { @@ -3498,6 +3614,9 @@ "paths": [ "/api/v1/persistentvolumes", "/api/v1/persistentvolumes/{name}" + ], + "subresources": [ + "status" ] }, { @@ -3569,6 +3688,17 @@ "/api/v1/pods", "/api/v1/namespaces/{namespace}/pods", "/api/v1/namespaces/{namespace}/pods/{name}" + ], + "subresources": [ + "attach", + "binding", + "ephemeralcontainers", + "eviction", + "exec", + "log", + "portforward", + "proxy", + "status" ] }, { @@ -3845,7 +3975,8 @@ "/api/v1/podtemplates", "/api/v1/namespaces/{namespace}/podtemplates", "/api/v1/namespaces/{namespace}/podtemplates/{name}" - ] + ], + "subresources": [] }, { "name": "replicationcontrollers", @@ -3887,6 +4018,10 @@ "/api/v1/replicationcontrollers", "/api/v1/namespaces/{namespace}/replicationcontrollers", "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}" + ], + "subresources": [ + "scale", + "status" ] }, { @@ -3987,6 +4122,9 @@ "/api/v1/resourcequotas", "/api/v1/namespaces/{namespace}/resourcequotas", "/api/v1/namespaces/{namespace}/resourcequotas/{name}" + ], + "subresources": [ + "status" ] }, { @@ -4058,7 +4196,8 @@ "/api/v1/secrets", "/api/v1/namespaces/{namespace}/secrets", "/api/v1/namespaces/{namespace}/secrets/{name}" - ] + ], + "subresources": [] }, { "name": "serviceaccounts", @@ -4100,6 +4239,9 @@ "/api/v1/serviceaccounts", "/api/v1/namespaces/{namespace}/serviceaccounts", "/api/v1/namespaces/{namespace}/serviceaccounts/{name}" + ], + "subresources": [ + "token" ] }, { @@ -4165,6 +4307,10 @@ "/api/v1/services", "/api/v1/namespaces/{namespace}/services", "/api/v1/namespaces/{namespace}/services/{name}" + ], + "subresources": [ + "proxy", + "status" ] }, { diff --git a/k8s-pb-codegen/openapi/list-resources.jq b/k8s-pb-codegen/openapi/list-resources.jq index 68de714..1301cab 100644 --- a/k8s-pb-codegen/openapi/list-resources.jq +++ b/k8s-pb-codegen/openapi/list-resources.jq @@ -99,5 +99,16 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); ), paths: (map(.path) | unique | sort_by(length)), }) + # Add names of subresources without the resource prefix + | [ + ([.[] | select(.subresource) | .name]) as $subresources + | .[] + | if .subresource then + . + else + (.name + "/") as $parent + | . + {subresources: [$subresources | .[] | select(. | startswith($parent)) | sub($parent; "")]} + end + ] ) }) From a932174eaea82d0242f27b55308e12196c5138fd Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 02:27:45 -0700 Subject: [PATCH 13/16] Merge subresources into parent Signed-off-by: kazk --- k8s-pb-codegen/openapi/api-resources.json | 2055 +++++++-------------- k8s-pb-codegen/openapi/list-resources.jq | 12 +- 2 files changed, 665 insertions(+), 1402 deletions(-) diff --git a/k8s-pb-codegen/openapi/api-resources.json b/k8s-pb-codegen/openapi/api-resources.json index 0854097..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, @@ -44,11 +44,11 @@ { "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, @@ -88,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", @@ -123,36 +123,19 @@ "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status" + ] + } ] } ] @@ -163,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", @@ -198,36 +181,19 @@ "/apis/apiregistration.k8s.io/v1/apiservices/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status" + ] + } ] } ] @@ -238,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, @@ -281,11 +247,11 @@ { "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", @@ -320,46 +286,29 @@ "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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", @@ -394,76 +343,42 @@ "/apis/apps/v1/namespaces/{namespace}/deployments/{name}" ], "subresources": [ - "scale", - "status" - ] - }, - { - "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" + { + "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", @@ -498,76 +413,42 @@ "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}" ], "subresources": [ - "scale", - "status" - ] - }, - { - "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" + { + "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", @@ -602,66 +483,32 @@ "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}" ], "subresources": [ - "scale", - "status" - ] - }, - { - "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" + { + "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" + ] + } ] } ] @@ -672,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", @@ -703,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", @@ -729,11 +576,11 @@ { "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", @@ -755,11 +602,11 @@ { "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", @@ -781,11 +628,11 @@ { "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", @@ -812,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", @@ -851,36 +698,19 @@ "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}" ], "subresources": [ - "status" - ] - }, - { - "name": "horizontalpodautoscalers/status", - "namespaced": true, - "subresource": true, - "apiGroupVersion": "autoscaling/v1", - "group": "autoscaling", - "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, - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] } ] @@ -891,11 +721,11 @@ { "name": "horizontalpodautoscalers", "namespaced": true, - "subresource": false, "apiGroupVersion": "autoscaling/v2beta1", "group": "autoscaling", "version": "v2beta1", "kind": "HorizontalPodAutoscaler", + "proto": "api.autoscaling.v2beta1.HorizontalPodAutoscaler", "rust": "api::autoscaling::v2beta1::HorizontalPodAutoscaler", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::autoscaling::v2beta1::HorizontalPodAutoscalerSpec", @@ -930,51 +760,34 @@ "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}" ], "subresources": [ - "status" + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] - }, + } + ] + }, + { + "apiGroupVersion": "autoscaling/v2beta2", + "resources": [ { - "name": "horizontalpodautoscalers/status", + "name": "horizontalpodautoscalers", "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" - ] - } - ] - }, - { - "apiGroupVersion": "autoscaling/v2beta2", - "resources": [ - { - "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", @@ -1009,36 +822,19 @@ "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status" + ] + } ] } ] @@ -1049,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", @@ -1088,46 +884,29 @@ "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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", @@ -1162,36 +941,19 @@ "/apis/batch/v1/namespaces/{namespace}/jobs/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status" + ] + } ] } ] @@ -1202,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", @@ -1241,36 +1003,19 @@ "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status" + ] + } ] } ] @@ -1281,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", @@ -1316,66 +1061,32 @@ "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}" ], "subresources": [ - "approval", - "status" - ] - }, - { - "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" + { + "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" + ] + } ] } ] @@ -1386,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", @@ -1434,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, @@ -1482,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, @@ -1530,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, @@ -1578,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, @@ -1626,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", @@ -1661,46 +1372,29 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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", @@ -1731,36 +1425,19 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}" ], "subresources": [ - "status" - ] - }, - { - "name": "prioritylevelconfigurations/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "flowcontrol.apiserver.k8s.io/v1beta1", - "group": "flowcontrol.apiserver.k8s.io", - "version": "v1beta1", - "kind": "PriorityLevelConfiguration", - "rust": "api::flowcontrol::v1beta1::PriorityLevelConfiguration", - "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" + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" + ] + } ] } ] @@ -1771,11 +1448,11 @@ { "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", @@ -1806,51 +1483,34 @@ "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}" ], "subresources": [ - "status" + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status" + ] + } ] - }, + } + ] + }, + { + "apiGroupVersion": "networking.k8s.io/v1", + "resources": [ { - "name": "storageversions/status", + "name": "ingressclasses", "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" - ] - } - ] - }, - { - "apiGroupVersion": "networking.k8s.io/v1", - "resources": [ - { - "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", @@ -1885,11 +1545,11 @@ { "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", @@ -1924,46 +1584,29 @@ "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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", @@ -2007,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, @@ -2051,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", @@ -2095,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, @@ -2139,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", @@ -2178,36 +1821,19 @@ "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } ] } ] @@ -2218,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", @@ -2257,46 +1883,29 @@ "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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", @@ -2336,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, @@ -2375,11 +1984,11 @@ { "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, @@ -2414,11 +2023,11 @@ { "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, @@ -2457,11 +2066,11 @@ { "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, @@ -2505,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, @@ -2544,11 +2153,11 @@ { "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, @@ -2583,11 +2192,11 @@ { "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, @@ -2626,11 +2235,11 @@ { "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, @@ -2674,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, @@ -2718,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, @@ -2762,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", @@ -2801,11 +2410,11 @@ { "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", @@ -2840,11 +2449,11 @@ { "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, @@ -2879,11 +2488,11 @@ { "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", @@ -2914,36 +2523,19 @@ "/apis/storage.k8s.io/v1/volumeattachments/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/storage.k8s.io/v1/volumeattachments/{name}/status" + ] + } ] } ] @@ -2954,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, @@ -2997,11 +2589,11 @@ { "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", @@ -3041,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, @@ -3089,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, @@ -3115,11 +2707,11 @@ { "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, @@ -3144,11 +2736,11 @@ { "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, @@ -3187,11 +2779,11 @@ { "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, @@ -3230,11 +2822,11 @@ { "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, @@ -3273,11 +2865,11 @@ { "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", @@ -3316,11 +2908,11 @@ { "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", @@ -3349,72 +2941,40 @@ "/api/v1/namespaces/{name}" ], "subresources": [ - "finalize", - "status" - ] - }, - { - "name": "namespaces/finalize", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "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", - "verbs": [ - "update" - ], - "scopedVerbs": { - "all": [ - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{name}/finalize" - ] - }, - { - "name": "namespaces/status", - "namespaced": false, - "subresource": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Namespace", - "rust": "api::core::v1::Namespace", - "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::NamespaceSpec", - "status": "api::core::v1::NamespaceStatus", - "condition": "api::core::v1::NamespaceCondition", - "verbs": [ - "get", - "patch", - "update" - ], - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{name}/status" + { + "name": "finalize", + "scopedVerbs": { + "all": [ + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/finalize" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/status" + ] + } ] }, { "name": "nodes", "namespaced": false, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "Node", + "proto": "api.core.v1.Node", "rust": "api::core::v1::Node", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::core::v1::NodeSpec", @@ -3445,73 +3005,41 @@ "/api/v1/nodes/{name}" ], "subresources": [ - "proxy", - "status" - ] - }, - { - "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": "proxy", + "scopedVerbs": { + "all": [ + "connect" + ] + }, + "paths": [ + "/api/v1/nodes/{name}/proxy", + "/api/v1/nodes/{name}/proxy/{path}" + ] + }, + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/nodes/{name}/status" + ] + } ] }, { "name": "persistentvolumeclaims", "namespaced": true, - "subresource": false, "apiGroupVersion": "v1", "group": "", "version": "v1", "kind": "PersistentVolumeClaim", + "proto": "api.core.v1.PersistentVolumeClaim", "rust": "api::core::v1::PersistentVolumeClaim", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": "api::core::v1::PersistentVolumeClaimSpec", @@ -3546,46 +3074,29 @@ "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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", @@ -3616,47 +3127,30 @@ "/api/v1/persistentvolumes/{name}" ], "subresources": [ - "status" + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/persistentvolumes/{name}/status" + ] + } ] }, { - "name": "persistentvolumes/status", - "namespaced": false, - "subresource": true, + "name": "pods", + "namespaced": 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" - ] - }, - { - "name": "pods", - "namespaced": true, - "subresource": false, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Pod", - "rust": "api::core::v1::Pod", + "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", @@ -3690,259 +3184,120 @@ "/api/v1/namespaces/{namespace}/pods/{name}" ], "subresources": [ - "attach", - "binding", - "ephemeralcontainers", - "eviction", - "exec", - "log", - "portforward", - "proxy", - "status" - ] - }, - { - "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" + { + "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, @@ -3981,11 +3336,11 @@ { "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", @@ -4020,76 +3375,42 @@ "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}" ], "subresources": [ - "scale", - "status" - ] - }, - { - "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" + { + "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", @@ -4124,46 +3445,29 @@ "/api/v1/namespaces/{namespace}/resourcequotas/{name}" ], "subresources": [ - "status" - ] - }, - { - "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" + { + "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, @@ -4202,11 +3506,11 @@ { "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, @@ -4241,42 +3545,27 @@ "/api/v1/namespaces/{namespace}/serviceaccounts/{name}" ], "subresources": [ - "token" - ] - }, - { - "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" + { + "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", @@ -4309,63 +3598,31 @@ "/api/v1/namespaces/{namespace}/services/{name}" ], "subresources": [ - "proxy", - "status" - ] - }, - { - "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" + { + "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 1301cab..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,16 +102,19 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); ), paths: (map(.path) | unique | sort_by(length)), }) - # Add names of subresources without the resource prefix + # Add subresource infos to parent and remove them | [ - ([.[] | select(.subresource) | .name]) as $subresources + ([.[] | select(.subresource) | {name, scopedVerbs, paths}]) as $subresources | .[] | if .subresource then . else (.name + "/") as $parent - | . + {subresources: [$subresources | .[] | select(. | startswith($parent)) | sub($parent; "")]} + | ([$subresources | .[] | select(.name | startswith($parent)) | {name: (.name | sub($parent; "")), scopedVerbs, paths}]) as $subs + | . + {subresources: $subs} end + | select(.subresource | not) + | del(.subresource) ] ) }) From 955920aa5d097a61f3b782355f1bc091abcdde51 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 02:35:49 -0700 Subject: [PATCH 14/16] 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 | 122 + k8s-pb-codegen/openapi/transformed.json | 2860 +++++++++++++++++++++++ 2 files changed, 2982 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..4a75cb6 --- /dev/null +++ b/k8s-pb-codegen/openapi/transform.jq @@ -0,0 +1,122 @@ +# Transform `swagger.json` 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. + | .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, + 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) + ] + ) +}) +| [.[].resources[] | {key: .proto, value: .}] +| from_entries diff --git a/k8s-pb-codegen/openapi/transformed.json b/k8s-pb-codegen/openapi/transformed.json new file mode 100644 index 0000000..df03e35 --- /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": [] + }, + "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" + ] + } + ] + }, + "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.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.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.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.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.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.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.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.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.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.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.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.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.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.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": [] + }, + "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.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.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.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.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.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" + ] + } + ] + } +} From 582b9f1be9b08f494f8ef386a9a845079eec9e13 Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 11:25:28 -0700 Subject: [PATCH 15/16] Sort resources by key Signed-off-by: kazk --- k8s-pb-codegen/openapi/transform.jq | 17 +- k8s-pb-codegen/openapi/transformed.json | 1994 +++++++++++------------ 2 files changed, 1004 insertions(+), 1007 deletions(-) diff --git a/k8s-pb-codegen/openapi/transform.jq b/k8s-pb-codegen/openapi/transform.jq index 4a75cb6..e3f6bab 100644 --- a/k8s-pb-codegen/openapi/transform.jq +++ b/k8s-pb-codegen/openapi/transform.jq @@ -1,4 +1,4 @@ -# Transform `swagger.json` map of proto path to resource infos. +# 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/"; ""); @@ -103,20 +103,17 @@ 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 | [ - ([.[] | 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) + | (.name + "/") as $parent + | ([$subresources | .[] | select(.name | startswith($parent)) | {name: (.name | sub($parent; "")), scopedVerbs, paths}]) as $subs + | . + {subresources: $subs} | del(.subresource) ] ) }) | [.[].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 index df03e35..33806f0 100644 --- a/k8s-pb-codegen/openapi/transformed.json +++ b/k8s-pb-codegen/openapi/transformed.json @@ -59,63 +59,19 @@ ], "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", + "api.apiserverinternal.v1alpha1.StorageVersion": { + "name": "storageversions", "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", + "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": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceSpec", - "status": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceStatus", - "condition": "kube_aggregator::pkg::apis::apiregistration::v1::APIServiceCondition", + "spec": "api::apiserverinternal::v1alpha1::StorageVersionSpec", + "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", + "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", "scopedVerbs": { "all": [ "create", @@ -128,8 +84,8 @@ ] }, "paths": [ - "/apis/apiregistration.k8s.io/v1/apiservices", - "/apis/apiregistration.k8s.io/v1/apiservices/{name}" + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions", + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}" ], "subresources": [ { @@ -142,7 +98,7 @@ ] }, "paths": [ - "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status" + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status" ] } ] @@ -906,15 +862,63 @@ ], "subresources": [] }, - "api.discovery.v1.EndpointSlice": { - "name": "endpointslices", + "api.core.v1.Binding": { + "name": "bindings", "namespaced": true, - "apiGroupVersion": "discovery.k8s.io/v1", - "group": "discovery.k8s.io", + "apiGroupVersion": "v1", + "group": "", "version": "v1", - "kind": "EndpointSlice", - "proto": "api.discovery.v1.EndpointSlice", - "rust": "api::discovery::v1::EndpointSlice", + "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, @@ -934,21 +938,21 @@ ] }, "paths": [ - "/apis/discovery.k8s.io/v1/endpointslices", - "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices", - "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}" + "/api/v1/configmaps", + "/api/v1/namespaces/{namespace}/configmaps", + "/api/v1/namespaces/{namespace}/configmaps/{name}" ], "subresources": [] }, - "api.discovery.v1beta1.EndpointSlice": { - "name": "endpointslices", + "api.core.v1.Endpoints": { + "name": "endpoints", "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", + "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, @@ -968,21 +972,21 @@ ] }, "paths": [ - "/apis/discovery.k8s.io/v1beta1/endpointslices", - "/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices", - "/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}" + "/api/v1/endpoints", + "/api/v1/namespaces/{namespace}/endpoints", + "/api/v1/namespaces/{namespace}/endpoints/{name}" ], "subresources": [] }, - "api.events.v1.Event": { + "api.core.v1.Event": { "name": "events", "namespaced": true, - "apiGroupVersion": "events.k8s.io/v1", - "group": "events.k8s.io", + "apiGroupVersion": "v1", + "group": "", "version": "v1", "kind": "Event", - "proto": "api.events.v1.Event", - "rust": "api::events::v1::Event", + "proto": "api.core.v1.Event", + "rust": "api::core::v1::Event", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, @@ -1002,23 +1006,23 @@ ] }, "paths": [ - "/apis/events.k8s.io/v1/events", - "/apis/events.k8s.io/v1/namespaces/{namespace}/events", - "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}" + "/api/v1/events", + "/api/v1/namespaces/{namespace}/events", + "/api/v1/namespaces/{namespace}/events/{name}" ], "subresources": [] }, - "api.events.v1beta1.Event": { - "name": "events", + "api.core.v1.LimitRange": { + "name": "limitranges", "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", + "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": null, + "spec": "api::core::v1::LimitRangeSpec", "status": null, "condition": null, "scopedVerbs": { @@ -1036,30 +1040,29 @@ ] }, "paths": [ - "/apis/events.k8s.io/v1beta1/events", - "/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events", - "/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}" + "/api/v1/limitranges", + "/api/v1/namespaces/{namespace}/limitranges", + "/api/v1/namespaces/{namespace}/limitranges/{name}" ], "subresources": [] }, - "api.flowcontrol.v1beta1.FlowSchema": { - "name": "flowschemas", + "api.core.v1.Namespace": { + "name": "namespaces", "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", + "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::flowcontrol::v1beta1::FlowSchemaSpec", - "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", - "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", + "spec": "api::core::v1::NamespaceSpec", + "status": "api::core::v1::NamespaceStatus", + "condition": "api::core::v1::NamespaceCondition", "scopedVerbs": { "all": [ "create", "delete", - "deletecollection", "get", "list", "patch", @@ -1067,10 +1070,21 @@ ] }, "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas", - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}" + "/api/v1/namespaces", + "/api/v1/namespaces/{name}" ], "subresources": [ + { + "name": "finalize", + "scopedVerbs": { + "all": [ + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{name}/finalize" + ] + }, { "name": "status", "scopedVerbs": { @@ -1081,24 +1095,24 @@ ] }, "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status" + "/api/v1/namespaces/{name}/status" ] } ] }, - "api.flowcontrol.v1beta1.PriorityLevelConfiguration": { - "name": "prioritylevelconfigurations", + "api.core.v1.Node": { + "name": "nodes", "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", + "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", @@ -1111,10 +1125,22 @@ ] }, "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations", - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}" + "/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": { @@ -1125,24 +1151,24 @@ ] }, "paths": [ - "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" + "/api/v1/nodes/{name}/status" ] } ] }, - "api.apiserverinternal.v1alpha1.StorageVersion": { - "name": "storageversions", + "api.core.v1.PersistentVolume": { + "name": "persistentvolumes", "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", + "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::apiserverinternal::v1alpha1::StorageVersionSpec", - "status": "api::apiserverinternal::v1alpha1::StorageVersionStatus", - "condition": "api::apiserverinternal::v1alpha1::StorageVersionCondition", + "spec": "api::core::v1::PersistentVolumeSpec", + "status": "api::core::v1::PersistentVolumeStatus", + "condition": null, "scopedVerbs": { "all": [ "create", @@ -1155,8 +1181,8 @@ ] }, "paths": [ - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions", - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}" + "/api/v1/persistentvolumes", + "/api/v1/persistentvolumes/{name}" ], "subresources": [ { @@ -1169,26 +1195,29 @@ ] }, "paths": [ - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status" + "/api/v1/persistentvolumes/{name}/status" ] } ] }, - "api.networking.v1.IngressClass": { - "name": "ingressclasses", - "namespaced": false, - "apiGroupVersion": "networking.k8s.io/v1", - "group": "networking.k8s.io", + "api.core.v1.PersistentVolumeClaim": { + "name": "persistentvolumeclaims", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", "version": "v1", - "kind": "IngressClass", - "proto": "api.networking.v1.IngressClass", - "rust": "api::networking::v1::IngressClass", + "kind": "PersistentVolumeClaim", + "proto": "api.core.v1.PersistentVolumeClaim", + "rust": "api::core::v1::PersistentVolumeClaim", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::networking::v1::IngressClassSpec", - "status": null, - "condition": null, + "spec": "api::core::v1::PersistentVolumeClaimSpec", + "status": "api::core::v1::PersistentVolumeClaimStatus", + "condition": "api::core::v1::PersistentVolumeClaimCondition", "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1199,24 +1228,39 @@ ] }, "paths": [ - "/apis/networking.k8s.io/v1/ingressclasses", - "/apis/networking.k8s.io/v1/ingressclasses/{name}" + "/api/v1/persistentvolumeclaims", + "/api/v1/namespaces/{namespace}/persistentvolumeclaims", + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status" + ] + } + ] }, - "api.networking.v1.Ingress": { - "name": "ingresses", + "api.core.v1.Pod": { + "name": "pods", "namespaced": true, - "apiGroupVersion": "networking.k8s.io/v1", - "group": "networking.k8s.io", + "apiGroupVersion": "v1", + "group": "", "version": "v1", - "kind": "Ingress", - "proto": "api.networking.v1.Ingress", - "rust": "api::networking::v1::Ingress", + "kind": "Pod", + "proto": "api.core.v1.Pod", + "rust": "api::core::v1::Pod", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::networking::v1::IngressSpec", - "status": "api::networking::v1::IngressStatus", - "condition": null, + "spec": "api::core::v1::PodSpec", + "status": "api::core::v1::PodStatus", + "condition": "api::core::v1::PodCondition", "scopedVerbs": { "all": [ "list" @@ -1232,11 +1276,102 @@ ] }, "paths": [ - "/apis/networking.k8s.io/v1/ingresses", - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses", - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" + "/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": { @@ -1247,22 +1382,22 @@ ] }, "paths": [ - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" + "/api/v1/namespaces/{namespace}/pods/{name}/status" ] } ] }, - "api.networking.v1.NetworkPolicy": { - "name": "networkpolicies", + "api.core.v1.PodTemplate": { + "name": "podtemplates", "namespaced": true, - "apiGroupVersion": "networking.k8s.io/v1", - "group": "networking.k8s.io", + "apiGroupVersion": "v1", + "group": "", "version": "v1", - "kind": "NetworkPolicy", - "proto": "api.networking.v1.NetworkPolicy", - "rust": "api::networking::v1::NetworkPolicy", + "kind": "PodTemplate", + "proto": "api.core.v1.PodTemplate", + "rust": "api::core::v1::PodTemplate", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::networking::v1::NetworkPolicySpec", + "spec": null, "status": null, "condition": null, "scopedVerbs": { @@ -1280,27 +1415,30 @@ ] }, "paths": [ - "/apis/networking.k8s.io/v1/networkpolicies", - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies", - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}" + "/api/v1/podtemplates", + "/api/v1/namespaces/{namespace}/podtemplates", + "/api/v1/namespaces/{namespace}/podtemplates/{name}" ], "subresources": [] }, - "api.node.v1.RuntimeClass": { - "name": "runtimeclasses", - "namespaced": false, - "apiGroupVersion": "node.k8s.io/v1", - "group": "node.k8s.io", + "api.core.v1.ReplicationController": { + "name": "replicationcontrollers", + "namespaced": true, + "apiGroupVersion": "v1", + "group": "", "version": "v1", - "kind": "RuntimeClass", - "proto": "api.node.v1.RuntimeClass", - "rust": "api::node::v1::RuntimeClass", + "kind": "ReplicationController", + "proto": "api.core.v1.ReplicationController", + "rust": "api::core::v1::ReplicationController", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": null, - "status": null, - "condition": null, + "spec": "api::core::v1::ReplicationControllerSpec", + "status": "api::core::v1::ReplicationControllerStatus", + "condition": "api::core::v1::ReplicationControllerCondition", "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1311,26 +1449,57 @@ ] }, "paths": [ - "/apis/node.k8s.io/v1/runtimeclasses", - "/apis/node.k8s.io/v1/runtimeclasses/{name}" + "/api/v1/replicationcontrollers", + "/api/v1/namespaces/{namespace}/replicationcontrollers", + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}" ], - "subresources": [] + "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.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", + "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::node::v1alpha1::RuntimeClassSpec", - "status": null, + "spec": "api::core::v1::ResourceQuotaSpec", + "status": "api::core::v1::ResourceQuotaStatus", "condition": null, "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1341,26 +1510,44 @@ ] }, "paths": [ - "/apis/node.k8s.io/v1alpha1/runtimeclasses", - "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" + "/api/v1/resourcequotas", + "/api/v1/namespaces/{namespace}/resourcequotas", + "/api/v1/namespaces/{namespace}/resourcequotas/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status" + ] + } + ] }, - "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", + "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", @@ -1371,23 +1558,24 @@ ] }, "paths": [ - "/apis/node.k8s.io/v1beta1/runtimeclasses", - "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" + "/api/v1/secrets", + "/api/v1/namespaces/{namespace}/secrets", + "/api/v1/namespaces/{namespace}/secrets/{name}" ], "subresources": [] }, - "api.policy.v1.PodDisruptionBudget": { - "name": "poddisruptionbudgets", + "api.core.v1.Service": { + "name": "services", "namespaced": true, - "apiGroupVersion": "policy/v1", - "group": "policy", + "apiGroupVersion": "v1", + "group": "", "version": "v1", - "kind": "PodDisruptionBudget", - "proto": "api.policy.v1.PodDisruptionBudget", - "rust": "api::policy::v1::PodDisruptionBudget", + "kind": "Service", + "proto": "api.core.v1.Service", + "rust": "api::core::v1::Service", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::policy::v1::PodDisruptionBudgetSpec", - "status": "api::policy::v1::PodDisruptionBudgetStatus", + "spec": "api::core::v1::ServiceSpec", + "status": "api::core::v1::ServiceStatus", "condition": "apimachinery::pkg::apis::meta::v1::Condition", "scopedVerbs": { "all": [ @@ -1396,7 +1584,6 @@ "namespaced": [ "create", "delete", - "deletecollection", "get", "list", "patch", @@ -1404,11 +1591,23 @@ ] }, "paths": [ - "/apis/policy/v1/poddisruptionbudgets", - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets", - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}" + "/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": { @@ -1419,24 +1618,24 @@ ] }, "paths": [ - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + "/api/v1/namespaces/{namespace}/services/{name}/status" ] } ] }, - "api.policy.v1beta1.PodDisruptionBudget": { - "name": "poddisruptionbudgets", + "api.core.v1.ServiceAccount": { + "name": "serviceaccounts", "namespaced": true, - "apiGroupVersion": "policy/v1beta1", - "group": "policy", - "version": "v1beta1", - "kind": "PodDisruptionBudget", - "proto": "api.policy.v1beta1.PodDisruptionBudget", - "rust": "api::policy::v1beta1::PodDisruptionBudget", + "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": "api::policy::v1beta1::PodDisruptionBudgetSpec", - "status": "api::policy::v1beta1::PodDisruptionBudgetStatus", - "condition": "apimachinery::pkg::apis::meta::v1::Condition", + "spec": null, + "status": null, + "condition": null, "scopedVerbs": { "all": [ "list" @@ -1452,41 +1651,42 @@ ] }, "paths": [ - "/apis/policy/v1beta1/poddisruptionbudgets", - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets", - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}" + "/api/v1/serviceaccounts", + "/api/v1/namespaces/{namespace}/serviceaccounts", + "/api/v1/namespaces/{namespace}/serviceaccounts/{name}" ], "subresources": [ { - "name": "status", + "name": "token", "scopedVerbs": { "namespaced": [ - "get", - "patch", - "update" + "create" ] }, "paths": [ - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + "/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token" ] } ] }, - "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", + "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": "api::policy::v1beta1::PodSecurityPolicySpec", + "spec": null, "status": null, "condition": null, "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1497,26 +1697,30 @@ ] }, "paths": [ - "/apis/policy/v1beta1/podsecuritypolicies", - "/apis/policy/v1beta1/podsecuritypolicies/{name}" + "/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.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", + "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", @@ -1527,26 +1731,30 @@ ] }, "paths": [ - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings", - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}" + "/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.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", + "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", @@ -1557,20 +1765,21 @@ ] }, "paths": [ - "/apis/rbac.authorization.k8s.io/v1/clusterroles", - "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}" + "/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.rbac.v1.RoleBinding": { - "name": "rolebindings", + "api.events.v1beta1.Event": { + "name": "events", "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", + "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, @@ -1590,30 +1799,27 @@ ] }, "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}" + "/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.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", + "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": null, - "status": null, - "condition": null, + "spec": "api::flowcontrol::v1beta1::FlowSchemaSpec", + "status": "api::flowcontrol::v1beta1::FlowSchemaStatus", + "condition": "api::flowcontrol::v1beta1::FlowSchemaCondition", "scopedVerbs": { "all": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -1624,25 +1830,38 @@ ] }, "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}" + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas", + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status" + ] + } + ] }, - "api.rbac.v1alpha1.ClusterRoleBinding": { - "name": "clusterrolebindings", + "api.flowcontrol.v1beta1.PriorityLevelConfiguration": { + "name": "prioritylevelconfigurations", "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", + "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": null, - "status": null, - "condition": null, + "spec": "api::flowcontrol::v1beta1::PriorityLevelConfigurationSpec", + "status": "api::flowcontrol::v1beta1::PriorityLevelConfigurationStatus", + "condition": "api::flowcontrol::v1beta1::PriorityLevelConfigurationCondition", "scopedVerbs": { "all": [ "create", @@ -1655,26 +1874,43 @@ ] }, "paths": [ - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings", - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}" + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations", + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "all": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status" + ] + } + ] }, - "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", + "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": null, - "status": null, + "spec": "api::networking::v1::IngressSpec", + "status": "api::networking::v1::IngressStatus", "condition": null, "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1685,29 +1921,41 @@ ] }, "paths": [ - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles", - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}" + "/apis/networking.k8s.io/v1/ingresses", + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses", + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status" + ] + } + ] }, - "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", + "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": null, + "spec": "api::networking::v1::IngressClassSpec", "status": null, "condition": null, "scopedVerbs": { "all": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -1718,23 +1966,22 @@ ] }, "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}" + "/apis/networking.k8s.io/v1/ingressclasses", + "/apis/networking.k8s.io/v1/ingressclasses/{name}" ], "subresources": [] }, - "api.rbac.v1alpha1.Role": { - "name": "roles", + "api.networking.v1.NetworkPolicy": { + "name": "networkpolicies", "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", + "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": null, + "spec": "api::networking::v1::NetworkPolicySpec", "status": null, "condition": null, "scopedVerbs": { @@ -1752,21 +1999,21 @@ ] }, "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}" + "/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.scheduling.v1.PriorityClass": { - "name": "priorityclasses", + "api.node.v1.RuntimeClass": { + "name": "runtimeclasses", "namespaced": false, - "apiGroupVersion": "scheduling.k8s.io/v1", - "group": "scheduling.k8s.io", + "apiGroupVersion": "node.k8s.io/v1", + "group": "node.k8s.io", "version": "v1", - "kind": "PriorityClass", - "proto": "api.scheduling.v1.PriorityClass", - "rust": "api::scheduling::v1::PriorityClass", + "kind": "RuntimeClass", + "proto": "api.node.v1.RuntimeClass", + "rust": "api::node::v1::RuntimeClass", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", "spec": null, "status": null, @@ -1783,22 +2030,22 @@ ] }, "paths": [ - "/apis/scheduling.k8s.io/v1/priorityclasses", - "/apis/scheduling.k8s.io/v1/priorityclasses/{name}" + "/apis/node.k8s.io/v1/runtimeclasses", + "/apis/node.k8s.io/v1/runtimeclasses/{name}" ], "subresources": [] }, - "api.scheduling.v1alpha1.PriorityClass": { - "name": "priorityclasses", + "api.node.v1alpha1.RuntimeClass": { + "name": "runtimeclasses", "namespaced": false, - "apiGroupVersion": "scheduling.k8s.io/v1alpha1", - "group": "scheduling.k8s.io", + "apiGroupVersion": "node.k8s.io/v1alpha1", + "group": "node.k8s.io", "version": "v1alpha1", - "kind": "PriorityClass", - "proto": "api.scheduling.v1alpha1.PriorityClass", - "rust": "api::scheduling::v1alpha1::PriorityClass", + "kind": "RuntimeClass", + "proto": "api.node.v1alpha1.RuntimeClass", + "rust": "api::node::v1alpha1::RuntimeClass", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": null, + "spec": "api::node::v1alpha1::RuntimeClassSpec", "status": null, "condition": null, "scopedVerbs": { @@ -1813,22 +2060,22 @@ ] }, "paths": [ - "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", - "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" + "/apis/node.k8s.io/v1alpha1/runtimeclasses", + "/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}" ], "subresources": [] }, - "api.storage.v1.CSIDriver": { - "name": "csidrivers", + "api.node.v1beta1.RuntimeClass": { + "name": "runtimeclasses", "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", + "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": "api::storage::v1::CSIDriverSpec", + "spec": null, "status": null, "condition": null, "scopedVerbs": { @@ -1843,26 +2090,29 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1/csidrivers", - "/apis/storage.k8s.io/v1/csidrivers/{name}" + "/apis/node.k8s.io/v1beta1/runtimeclasses", + "/apis/node.k8s.io/v1beta1/runtimeclasses/{name}" ], "subresources": [] }, - "api.storage.v1.CSINode": { - "name": "csinodes", - "namespaced": false, - "apiGroupVersion": "storage.k8s.io/v1", - "group": "storage.k8s.io", + "api.policy.v1.PodDisruptionBudget": { + "name": "poddisruptionbudgets", + "namespaced": true, + "apiGroupVersion": "policy/v1", + "group": "policy", "version": "v1", - "kind": "CSINode", - "proto": "api.storage.v1.CSINode", - "rust": "api::storage::v1::CSINode", + "kind": "PodDisruptionBudget", + "proto": "api.policy.v1.PodDisruptionBudget", + "rust": "api::policy::v1::PodDisruptionBudget", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::storage::v1::CSINodeSpec", - "status": null, - "condition": null, + "spec": "api::policy::v1::PodDisruptionBudgetSpec", + "status": "api::policy::v1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1873,26 +2123,44 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1/csinodes", - "/apis/storage.k8s.io/v1/csinodes/{name}" + "/apis/policy/v1/poddisruptionbudgets", + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets", + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } + ] }, - "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", + "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": null, - "status": null, - "condition": null, + "spec": "api::policy::v1beta1::PodDisruptionBudgetSpec", + "status": "api::policy::v1beta1::PodDisruptionBudgetStatus", + "condition": "apimachinery::pkg::apis::meta::v1::Condition", "scopedVerbs": { "all": [ + "list" + ], + "namespaced": [ "create", "delete", "deletecollection", @@ -1903,23 +2171,38 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1/storageclasses", - "/apis/storage.k8s.io/v1/storageclasses/{name}" + "/apis/policy/v1beta1/poddisruptionbudgets", + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets", + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}" ], - "subresources": [] + "subresources": [ + { + "name": "status", + "scopedVerbs": { + "namespaced": [ + "get", + "patch", + "update" + ] + }, + "paths": [ + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status" + ] + } + ] }, - "api.storage.v1.VolumeAttachment": { - "name": "volumeattachments", + "api.policy.v1beta1.PodSecurityPolicy": { + "name": "podsecuritypolicies", "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", + "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::storage::v1::VolumeAttachmentSpec", - "status": "api::storage::v1::VolumeAttachmentStatus", + "spec": "api::policy::v1beta1::PodSecurityPolicySpec", + "status": null, "condition": null, "scopedVerbs": { "all": [ @@ -1933,43 +2216,26 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1/volumeattachments", - "/apis/storage.k8s.io/v1/volumeattachments/{name}" + "/apis/policy/v1beta1/podsecuritypolicies", + "/apis/policy/v1beta1/podsecuritypolicies/{name}" ], - "subresources": [ - { - "name": "status", - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/apis/storage.k8s.io/v1/volumeattachments/{name}/status" - ] - } - ] + "subresources": [] }, - "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", + "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": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -1980,24 +2246,23 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1alpha1/csistoragecapacities", - "/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities", - "/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}" + "/apis/rbac.authorization.k8s.io/v1/clusterroles", + "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}" ], "subresources": [] }, - "api.storage.v1alpha1.VolumeAttachment": { - "name": "volumeattachments", + "api.rbac.v1.ClusterRoleBinding": { + "name": "clusterrolebindings", "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", + "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": "api::storage::v1alpha1::VolumeAttachmentSpec", - "status": "api::storage::v1alpha1::VolumeAttachmentStatus", + "spec": null, + "status": null, "condition": null, "scopedVerbs": { "all": [ @@ -2011,20 +2276,20 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1alpha1/volumeattachments", - "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings", + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}" ], "subresources": [] }, - "api.storage.v1beta1.CSIStorageCapacity": { - "name": "csistoragecapacities", + "api.rbac.v1.Role": { + "name": "roles", "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", + "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, @@ -2044,78 +2309,61 @@ ] }, "paths": [ - "/apis/storage.k8s.io/v1beta1/csistoragecapacities", - "/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities", - "/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}" + "/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.core.v1.Binding": { - "name": "bindings", + "api.rbac.v1.RoleBinding": { + "name": "rolebindings", "namespaced": true, - "apiGroupVersion": "v1", - "group": "", + "apiGroupVersion": "rbac.authorization.k8s.io/v1", + "group": "rbac.authorization.k8s.io", "version": "v1", - "kind": "Binding", - "proto": "api.core.v1.Binding", - "rust": "api::core::v1::Binding", + "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" - ] - }, - "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": [ + "create", + "delete", + "deletecollection", "get", - "list" + "list", + "patch", + "update" ] }, "paths": [ - "/api/v1/componentstatuses", - "/api/v1/componentstatuses/{name}" + "/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.core.v1.ConfigMap": { - "name": "configmaps", - "namespaced": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "ConfigMap", - "proto": "api.core.v1.ConfigMap", - "rust": "api::core::v1::ConfigMap", + "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": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2126,30 +2374,26 @@ ] }, "paths": [ - "/api/v1/configmaps", - "/api/v1/namespaces/{namespace}/configmaps", - "/api/v1/namespaces/{namespace}/configmaps/{name}" + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles", + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{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", + "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": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2160,21 +2404,20 @@ ] }, "paths": [ - "/api/v1/endpoints", - "/api/v1/namespaces/{namespace}/endpoints", - "/api/v1/namespaces/{namespace}/endpoints/{name}" + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings", + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}" ], "subresources": [] }, - "api.core.v1.Event": { - "name": "events", + "api.rbac.v1alpha1.Role": { + "name": "roles", "namespaced": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "Event", - "proto": "api.core.v1.Event", - "rust": "api::core::v1::Event", + "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, @@ -2194,23 +2437,23 @@ ] }, "paths": [ - "/api/v1/events", - "/api/v1/namespaces/{namespace}/events", - "/api/v1/namespaces/{namespace}/events/{name}" + "/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.core.v1.LimitRange": { - "name": "limitranges", + "api.rbac.v1alpha1.RoleBinding": { + "name": "rolebindings", "namespaced": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "LimitRange", - "proto": "api.core.v1.LimitRange", - "rust": "api::core::v1::LimitRange", + "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": "api::core::v1::LimitRangeSpec", + "spec": null, "status": null, "condition": null, "scopedVerbs": { @@ -2228,79 +2471,25 @@ ] }, "paths": [ - "/api/v1/limitranges", - "/api/v1/namespaces/{namespace}/limitranges", - "/api/v1/namespaces/{namespace}/limitranges/{name}" + "/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.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", + "api.scheduling.v1.PriorityClass": { + "name": "priorityclasses", "namespaced": false, - "apiGroupVersion": "v1", - "group": "", + "apiGroupVersion": "scheduling.k8s.io/v1", + "group": "scheduling.k8s.io", "version": "v1", - "kind": "Node", - "proto": "api.core.v1.Node", - "rust": "api::core::v1::Node", + "kind": "PriorityClass", + "proto": "api.scheduling.v1.PriorityClass", + "rust": "api::scheduling::v1::PriorityClass", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::NodeSpec", - "status": "api::core::v1::NodeStatus", - "condition": "api::core::v1::NodeCondition", + "spec": null, + "status": null, + "condition": null, "scopedVerbs": { "all": [ "create", @@ -2313,55 +2502,26 @@ ] }, "paths": [ - "/api/v1/nodes", - "/api/v1/nodes/{name}" + "/apis/scheduling.k8s.io/v1/priorityclasses", + "/apis/scheduling.k8s.io/v1/priorityclasses/{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" - ] - } - ] + "subresources": [] }, - "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", + "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": "api::core::v1::PersistentVolumeClaimSpec", - "status": "api::core::v1::PersistentVolumeClaimStatus", - "condition": "api::core::v1::PersistentVolumeClaimCondition", + "spec": null, + "status": null, + "condition": null, "scopedVerbs": { "all": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2372,38 +2532,23 @@ ] }, "paths": [ - "/api/v1/persistentvolumeclaims", - "/api/v1/namespaces/{namespace}/persistentvolumeclaims", - "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}" + "/apis/scheduling.k8s.io/v1alpha1/priorityclasses", + "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}" ], - "subresources": [ - { - "name": "status", - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status" - ] - } - ] + "subresources": [] }, - "api.core.v1.PersistentVolume": { - "name": "persistentvolumes", + "api.storage.v1.CSIDriver": { + "name": "csidrivers", "namespaced": false, - "apiGroupVersion": "v1", - "group": "", + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", "version": "v1", - "kind": "PersistentVolume", - "proto": "api.core.v1.PersistentVolume", - "rust": "api::core::v1::PersistentVolume", + "kind": "CSIDriver", + "proto": "api.storage.v1.CSIDriver", + "rust": "api::storage::v1::CSIDriver", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PersistentVolumeSpec", - "status": "api::core::v1::PersistentVolumeStatus", + "spec": "api::storage::v1::CSIDriverSpec", + "status": null, "condition": null, "scopedVerbs": { "all": [ @@ -2417,43 +2562,26 @@ ] }, "paths": [ - "/api/v1/persistentvolumes", - "/api/v1/persistentvolumes/{name}" + "/apis/storage.k8s.io/v1/csidrivers", + "/apis/storage.k8s.io/v1/csidrivers/{name}" ], - "subresources": [ - { - "name": "status", - "scopedVerbs": { - "all": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/persistentvolumes/{name}/status" - ] - } - ] + "subresources": [] }, - "api.core.v1.Pod": { - "name": "pods", - "namespaced": true, - "apiGroupVersion": "v1", - "group": "", + "api.storage.v1.CSINode": { + "name": "csinodes", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", "version": "v1", - "kind": "Pod", - "proto": "api.core.v1.Pod", - "rust": "api::core::v1::Pod", + "kind": "CSINode", + "proto": "api.storage.v1.CSINode", + "rust": "api::storage::v1::CSINode", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::PodSpec", - "status": "api::core::v1::PodStatus", - "condition": "api::core::v1::PodCondition", + "spec": "api::storage::v1::CSINodeSpec", + "status": null, + "condition": null, "scopedVerbs": { "all": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2464,135 +2592,26 @@ ] }, "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" - ] - } - ] + "/apis/storage.k8s.io/v1/csinodes", + "/apis/storage.k8s.io/v1/csinodes/{name}" + ], + "subresources": [] }, - "api.core.v1.PodTemplate": { - "name": "podtemplates", - "namespaced": true, - "apiGroupVersion": "v1", - "group": "", + "api.storage.v1.StorageClass": { + "name": "storageclasses", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", "version": "v1", - "kind": "PodTemplate", - "proto": "api.core.v1.PodTemplate", - "rust": "api::core::v1::PodTemplate", + "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": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2603,30 +2622,26 @@ ] }, "paths": [ - "/api/v1/podtemplates", - "/api/v1/namespaces/{namespace}/podtemplates", - "/api/v1/namespaces/{namespace}/podtemplates/{name}" + "/apis/storage.k8s.io/v1/storageclasses", + "/apis/storage.k8s.io/v1/storageclasses/{name}" ], "subresources": [] }, - "api.core.v1.ReplicationController": { - "name": "replicationcontrollers", - "namespaced": true, - "apiGroupVersion": "v1", - "group": "", + "api.storage.v1.VolumeAttachment": { + "name": "volumeattachments", + "namespaced": false, + "apiGroupVersion": "storage.k8s.io/v1", + "group": "storage.k8s.io", "version": "v1", - "kind": "ReplicationController", - "proto": "api.core.v1.ReplicationController", - "rust": "api::core::v1::ReplicationController", + "kind": "VolumeAttachment", + "proto": "api.storage.v1.VolumeAttachment", + "rust": "api::storage::v1::VolumeAttachment", "metadata": "apimachinery::pkg::apis::meta::v1::ObjectMeta", - "spec": "api::core::v1::ReplicationControllerSpec", - "status": "api::core::v1::ReplicationControllerStatus", - "condition": "api::core::v1::ReplicationControllerCondition", + "spec": "api::storage::v1::VolumeAttachmentSpec", + "status": "api::storage::v1::VolumeAttachmentStatus", + "condition": null, "scopedVerbs": { "all": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2637,51 +2652,37 @@ ] }, "paths": [ - "/api/v1/replicationcontrollers", - "/api/v1/namespaces/{namespace}/replicationcontrollers", - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}" + "/apis/storage.k8s.io/v1/volumeattachments", + "/apis/storage.k8s.io/v1/volumeattachments/{name}" ], "subresources": [ - { - "name": "scale", - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale" - ] - }, { "name": "status", "scopedVerbs": { - "namespaced": [ + "all": [ "get", "patch", "update" ] }, "paths": [ - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status" + "/apis/storage.k8s.io/v1/volumeattachments/{name}/status" ] } ] }, - "api.core.v1.ResourceQuota": { - "name": "resourcequotas", + "api.storage.v1alpha1.CSIStorageCapacity": { + "name": "csistoragecapacities", "namespaced": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "ResourceQuota", - "proto": "api.core.v1.ResourceQuota", - "rust": "api::core::v1::ResourceQuota", + "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": "api::core::v1::ResourceQuotaSpec", - "status": "api::core::v1::ResourceQuotaStatus", + "spec": null, + "status": null, "condition": null, "scopedVerbs": { "all": [ @@ -2698,44 +2699,27 @@ ] }, "paths": [ - "/api/v1/resourcequotas", - "/api/v1/namespaces/{namespace}/resourcequotas", - "/api/v1/namespaces/{namespace}/resourcequotas/{name}" + "/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": "status", - "scopedVerbs": { - "namespaced": [ - "get", - "patch", - "update" - ] - }, - "paths": [ - "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status" - ] - } - ] + "subresources": [] }, - "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", + "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": null, - "status": null, + "spec": "api::storage::v1alpha1::VolumeAttachmentSpec", + "status": "api::storage::v1alpha1::VolumeAttachmentStatus", "condition": null, "scopedVerbs": { "all": [ - "list" - ], - "namespaced": [ "create", "delete", "deletecollection", @@ -2746,21 +2730,20 @@ ] }, "paths": [ - "/api/v1/secrets", - "/api/v1/namespaces/{namespace}/secrets", - "/api/v1/namespaces/{namespace}/secrets/{name}" + "/apis/storage.k8s.io/v1alpha1/volumeattachments", + "/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}" ], "subresources": [] }, - "api.core.v1.ServiceAccount": { - "name": "serviceaccounts", + "api.storage.v1beta1.CSIStorageCapacity": { + "name": "csistoragecapacities", "namespaced": true, - "apiGroupVersion": "v1", - "group": "", - "version": "v1", - "kind": "ServiceAccount", - "proto": "api.core.v1.ServiceAccount", - "rust": "api::core::v1::ServiceAccount", + "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, @@ -2780,44 +2763,74 @@ ] }, "paths": [ - "/api/v1/serviceaccounts", - "/api/v1/namespaces/{namespace}/serviceaccounts", - "/api/v1/namespaces/{namespace}/serviceaccounts/{name}" + "/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": "token", + "name": "status", "scopedVerbs": { - "namespaced": [ - "create" + "all": [ + "get", + "patch", + "update" ] }, "paths": [ - "/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token" + "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status" ] } ] }, - "api.core.v1.Service": { - "name": "services", - "namespaced": true, - "apiGroupVersion": "v1", - "group": "", + "kube_aggregator.pkg.apis.apiregistration.v1.APIService": { + "name": "apiservices", + "namespaced": false, + "apiGroupVersion": "apiregistration.k8s.io/v1", + "group": "apiregistration.k8s.io", "version": "v1", - "kind": "Service", - "proto": "api.core.v1.Service", - "rust": "api::core::v1::Service", + "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": "api::core::v1::ServiceSpec", - "status": "api::core::v1::ServiceStatus", - "condition": "apimachinery::pkg::apis::meta::v1::Condition", + "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": [ - "list" - ], - "namespaced": [ "create", "delete", + "deletecollection", "get", "list", "patch", @@ -2825,34 +2838,21 @@ ] }, "paths": [ - "/api/v1/services", - "/api/v1/namespaces/{namespace}/services", - "/api/v1/namespaces/{namespace}/services/{name}" + "/apis/apiregistration.k8s.io/v1/apiservices", + "/apis/apiregistration.k8s.io/v1/apiservices/{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": [ + "all": [ "get", "patch", "update" ] }, "paths": [ - "/api/v1/namespaces/{namespace}/services/{name}/status" + "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status" ] } ] From 89a574fdbfb06669f3be6c39b392e2022b236cec Mon Sep 17 00:00:00 2001 From: kazk Date: Wed, 27 Oct 2021 12:20:48 -0700 Subject: [PATCH 16/16] Use more consistent formatting and add comments Signed-off-by: kazk --- k8s-pb-codegen/openapi/transform.jq | 149 ++++++++++++++++++---------- 1 file changed, 95 insertions(+), 54 deletions(-) diff --git a/k8s-pb-codegen/openapi/transform.jq b/k8s-pb-codegen/openapi/transform.jq index e3f6bab..7eac8e1 100644 --- a/k8s-pb-codegen/openapi/transform.jq +++ b/k8s-pb-codegen/openapi/transform.jq @@ -7,17 +7,26 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); ( [ - .definitions as $defs - | .definitions | to_entries[] + .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 - | { + .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("-"; "_"), @@ -28,33 +37,44 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); condition: $condition, }, } - ] - | sort_by(.key) - | from_entries -) as $definitions + ] | + sort_by(.key) | + from_entries +) as $definitions | -| [ - .paths | to_entries[] - | .key as $path - | .value | to_entries[] +[ + .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 + .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 - | { + (.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("/") + $path | + sub("^/apis?/\($apiGroupVersion)/(?:namespaces/\\{namespace\\}/)?"; "") | + split("/") | + map(select(. | (startswith("{") | not))) | + join("/") ), namespaced: ($path | test("/namespaces/\\{namespace\\}/")), kind: $gvk.kind, @@ -71,15 +91,19 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); condition: $definition.condition, path: $path, } -] -| group_by(.apiGroupVersion) -| map({ +] | +# 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({ + 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, @@ -93,27 +117,44 @@ def gvk_string: [.group, .version, .kind] | map(select(. != "")) | join("/"); status: .[0].status, condition: .[0].condition, scopedVerbs: ( - group_by(.namespaced) - | map({ + group_by(.namespaced) | + map({ key: (if .[0].namespaced then "namespaced" else "all" end), value: (map(.verb) | unique) - }) - | from_entries + }) | + 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 | .[] | select(.name | startswith($parent)) | {name: (.name | sub($parent; "")), scopedVerbs, paths}]) as $subs - | . + {subresources: $subs} - | del(.subresource) - ] + ([.[] | 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 +}) | +[.[].resources[] | {key: .proto, value: .}] | +sort_by(.key) | +from_entries