Skip to content

Commit

Permalink
Add v1.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnavion committed Dec 11, 2024
1 parent dfcf9ab commit 9413a9a
Show file tree
Hide file tree
Showing 660 changed files with 123,194 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ v1_28 = []
v1_29 = []
v1_30 = []
v1_31 = []
latest = ["v1_31"]
v1_32 = []
latest = ["v1_32"]
# Enable `schemars::JsonSchema` implementations on resource types.
schemars = ["dep:schemars"]

Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
use std::io::Write;

const MIN: usize = 26;
const MAX: usize = 31;
const MAX: usize = 32;

println!("cargo::rerun-if-env-changed=K8S_OPENAPI_ENABLED_VERSION");

Expand Down
2 changes: 1 addition & 1 deletion devenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

session_name='k8s-openapi'
max_version='1.31'
max_version='1.32'

if ! tmux has-session -t "=$session_name"; then
cd "$(dirname "$0")"
Expand Down
18 changes: 18 additions & 0 deletions k8s-openapi-codegen/src/supported_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub(crate) const ALL: &[SupportedVersion] = &[
SupportedVersion::V1_29,
SupportedVersion::V1_30,
SupportedVersion::V1_31,
SupportedVersion::V1_32,
];

#[derive(Clone, Copy, Debug)]
Expand All @@ -15,6 +16,7 @@ pub(crate) enum SupportedVersion {
V1_29,
V1_30,
V1_31,
V1_32,
}

impl SupportedVersion {
Expand All @@ -26,6 +28,7 @@ impl SupportedVersion {
SupportedVersion::V1_29 => "1.29",
SupportedVersion::V1_30 => "1.30",
SupportedVersion::V1_31 => "1.31",
SupportedVersion::V1_32 => "1.32",
}
}

Expand All @@ -37,6 +40,7 @@ impl SupportedVersion {
SupportedVersion::V1_29 => "v1_29",
SupportedVersion::V1_30 => "v1_30",
SupportedVersion::V1_31 => "v1_31",
SupportedVersion::V1_32 => "v1_32",
}
}

Expand All @@ -48,6 +52,7 @@ impl SupportedVersion {
SupportedVersion::V1_29 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.29.12/api/openapi-spec/swagger.json",
SupportedVersion::V1_30 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.30.8/api/openapi-spec/swagger.json",
SupportedVersion::V1_31 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.31.4/api/openapi-spec/swagger.json",
SupportedVersion::V1_32 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.32.0/api/openapi-spec/swagger.json",
}
}

Expand Down Expand Up @@ -155,6 +160,19 @@ impl SupportedVersion {
crate::fixups::upstream_bugs::required_properties::secret_key_selector,
crate::fixups::upstream_bugs::required_properties::secret_projection,
],

SupportedVersion::V1_32 => &[
crate::fixups::upstream_bugs::connect_options_gvk,
crate::fixups::upstream_bugs::optional_properties::eventsv1_event,
crate::fixups::upstream_bugs::required_properties::config_map_env_source,
crate::fixups::upstream_bugs::required_properties::config_map_key_selector,
crate::fixups::upstream_bugs::required_properties::config_map_projection,
crate::fixups::upstream_bugs::required_properties::config_map_volume_source,
crate::fixups::upstream_bugs::required_properties::local_object_reference,
crate::fixups::upstream_bugs::required_properties::secret_env_source,
crate::fixups::upstream_bugs::required_properties::secret_key_selector,
crate::fixups::upstream_bugs::required_properties::secret_projection,
],
};

let special_fixups = &[
Expand Down
1 change: 1 addition & 0 deletions k8s-openapi-tests-macro-deps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ test_v1_28 = ["k8s-openapi/v1_28"]
test_v1_29 = ["k8s-openapi/v1_29"]
test_v1_30 = ["k8s-openapi/v1_30"]
test_v1_31 = ["k8s-openapi/v1_31"]
test_v1_32 = ["k8s-openapi/v1_32"]
1 change: 1 addition & 0 deletions k8s-openapi-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ test_v1_28 = ["k8s-openapi/v1_28"]
test_v1_29 = ["k8s-openapi/v1_29"]
test_v1_30 = ["k8s-openapi/v1_30"]
test_v1_31 = ["k8s-openapi/v1_31"]
test_v1_32 = ["k8s-openapi/v1_32"]
2 changes: 1 addition & 1 deletion k8s-openapi-tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fn main() {
// Assert that the DEP_K8S_OPENAPI_*_VERSION is set by the k8s-openapi crate's build script correctly.

const MIN: usize = 26;
const MAX: usize = 31;
const MAX: usize = 32;

let enabled_version = {
let mut enabled_versions = (MIN..=MAX).filter(|v| std::env::var(format!("CARGO_FEATURE_TEST_V1_{v}")).is_ok());
Expand Down
1 change: 1 addition & 0 deletions k8s-openapi-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl Client {
#[cfg(feature = "test_v1_29")] let replays_directory = "v1-29";
#[cfg(feature = "test_v1_30")] let replays_directory = "v1-30";
#[cfg(feature = "test_v1_31")] let replays_directory = "v1-31";
#[cfg(feature = "test_v1_32")] let replays_directory = "v1-32";

let replays_directory =
std::path::Path::new(concat!(env!("CARGO_MANIFEST_DIR")))
Expand Down
10 changes: 10 additions & 0 deletions k8s-openapi-tests/test-replays/v1-32/api_versions-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"request_url": "/apis",
"request_method": "GET",
"request_body": "",
"request_content_type": null,
"response_status_code": 200,
"response_body": "{\"kind\":\"APIGroupList\",\"apiVersion\":\"v1\",\"groups\":[{\"name\":\"apiregistration.k8s.io\",\"versions\":[{\"groupVersion\":\"apiregistration.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"apiregistration.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"apps\",\"versions\":[{\"groupVersion\":\"apps/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"apps/v1\",\"version\":\"v1\"}},{\"name\":\"events.k8s.io\",\"versions\":[{\"groupVersion\":\"events.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"events.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"authentication.k8s.io\",\"versions\":[{\"groupVersion\":\"authentication.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"authentication.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"authorization.k8s.io\",\"versions\":[{\"groupVersion\":\"authorization.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"authorization.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"autoscaling\",\"versions\":[{\"groupVersion\":\"autoscaling/v2\",\"version\":\"v2\"},{\"groupVersion\":\"autoscaling/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"autoscaling/v2\",\"version\":\"v2\"}},{\"name\":\"batch\",\"versions\":[{\"groupVersion\":\"batch/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"batch/v1\",\"version\":\"v1\"}},{\"name\":\"certificates.k8s.io\",\"versions\":[{\"groupVersion\":\"certificates.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"certificates.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"networking.k8s.io\",\"versions\":[{\"groupVersion\":\"networking.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"networking.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"policy\",\"versions\":[{\"groupVersion\":\"policy/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"policy/v1\",\"version\":\"v1\"}},{\"name\":\"rbac.authorization.k8s.io\",\"versions\":[{\"groupVersion\":\"rbac.authorization.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"rbac.authorization.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"storage.k8s.io\",\"versions\":[{\"groupVersion\":\"storage.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"storage.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"admissionregistration.k8s.io\",\"versions\":[{\"groupVersion\":\"admissionregistration.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"admissionregistration.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"apiextensions.k8s.io\",\"versions\":[{\"groupVersion\":\"apiextensions.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"apiextensions.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"scheduling.k8s.io\",\"versions\":[{\"groupVersion\":\"scheduling.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"scheduling.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"coordination.k8s.io\",\"versions\":[{\"groupVersion\":\"coordination.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"coordination.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"node.k8s.io\",\"versions\":[{\"groupVersion\":\"node.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"node.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"discovery.k8s.io\",\"versions\":[{\"groupVersion\":\"discovery.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"discovery.k8s.io/v1\",\"version\":\"v1\"}},{\"name\":\"flowcontrol.apiserver.k8s.io\",\"versions\":[{\"groupVersion\":\"flowcontrol.apiserver.k8s.io/v1\",\"version\":\"v1\"}],\"preferredVersion\":{\"groupVersion\":\"flowcontrol.apiserver.k8s.io/v1\",\"version\":\"v1\"}}]}\n"
}
]
Loading

0 comments on commit 9413a9a

Please sign in to comment.