Skip to content

Commit 4dd42eb

Browse files
committed
Add v1.34.0
1 parent 9c882fd commit 4dd42eb

File tree

750 files changed

+117716
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

750 files changed

+117716
-35
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ v1_30 = []
5252
v1_31 = []
5353
v1_32 = []
5454
v1_33 = []
55-
latest = ["v1_33"]
55+
v1_34 = []
56+
latest = ["v1_34"]
5657
# Enable `schemars::JsonSchema` implementations on resource types.
5758
schemars = ["dep:schemars"]
5859

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
22
use std::io::Write;
33

44
const MIN: usize = 30;
5-
const MAX: usize = 33;
5+
const MAX: usize = 34;
66

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

devenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -euo pipefail
44

55
session_name='k8s-openapi'
6-
max_version='1.33'
6+
max_version='1.34'
77

88
if ! tmux has-session -t "=$session_name"; then
99
cd "$(dirname "$0")"

k8s-openapi-codegen/src/fixups/upstream_bugs.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,25 @@ pub(crate) mod optional_properties {
7070
Err("never applied events.k8s.io/v1.Event optional properties override".into())
7171
}
7272

73+
// `NetworkPolicySpec::podSelector`
74+
//
75+
// Ref: https://github.com/kubernetes/kubernetes/pull/131354
76+
pub(crate) fn networkingv1_networkpolicyspec(spec: &mut crate::swagger20::Spec) -> Result<(), crate::Error> {
77+
let definition_path = crate::swagger20::DefinitionPath("io.k8s.api.networking.v1.NetworkPolicySpec".to_owned());
78+
if let Some(definition) = spec.definitions.get_mut(&definition_path) {
79+
if let crate::swagger20::SchemaKind::Properties(properties) = &mut definition.kind {
80+
if let Some(property) = properties.get_mut("podSelector") {
81+
if property.1 {
82+
property.1 = false;
83+
return Ok(());
84+
}
85+
}
86+
}
87+
}
88+
89+
Err("never applied networking.k8s.io/v1.NetworkPolicySpec optional properties override".into())
90+
}
91+
7392
// `StatefulSetSpec::serviceName`
7493
//
7594
// Ref: https://github.com/kubernetes/kubernetes/pull/130233

k8s-openapi-codegen/src/supported_version.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pub(crate) const ALL: &[SupportedVersion] = &[
33
SupportedVersion::V1_31,
44
SupportedVersion::V1_32,
55
SupportedVersion::V1_33,
6+
SupportedVersion::V1_34,
67
];
78

89
#[derive(Clone, Copy, Debug)]
@@ -11,6 +12,7 @@ pub(crate) enum SupportedVersion {
1112
V1_31,
1213
V1_32,
1314
V1_33,
15+
V1_34,
1416
}
1517

1618
impl SupportedVersion {
@@ -20,6 +22,7 @@ impl SupportedVersion {
2022
SupportedVersion::V1_31 => "1.31",
2123
SupportedVersion::V1_32 => "1.32",
2224
SupportedVersion::V1_33 => "1.33",
25+
SupportedVersion::V1_34 => "1.34",
2326
}
2427
}
2528

@@ -29,6 +32,7 @@ impl SupportedVersion {
2932
SupportedVersion::V1_31 => "v1_31",
3033
SupportedVersion::V1_32 => "v1_32",
3134
SupportedVersion::V1_33 => "v1_33",
35+
SupportedVersion::V1_34 => "v1_34",
3236
}
3337
}
3438

@@ -38,6 +42,7 @@ impl SupportedVersion {
3842
SupportedVersion::V1_31 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.31.12/api/openapi-spec/swagger.json",
3943
SupportedVersion::V1_32 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.32.8/api/openapi-spec/swagger.json",
4044
SupportedVersion::V1_33 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.33.4/api/openapi-spec/swagger.json",
45+
SupportedVersion::V1_34 => "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.34.0/api/openapi-spec/swagger.json",
4146
}
4247
}
4348

@@ -48,6 +53,7 @@ impl SupportedVersion {
4853
crate::fixups::upstream_bugs::connect_options_gvk,
4954
crate::fixups::upstream_bugs::optional_properties::appsv1_statefulsetspec,
5055
crate::fixups::upstream_bugs::optional_properties::eventsv1_event,
56+
crate::fixups::upstream_bugs::optional_properties::networkingv1_networkpolicyspec,
5157
crate::fixups::upstream_bugs::required_properties::config_map_env_source,
5258
crate::fixups::upstream_bugs::required_properties::config_map_key_selector,
5359
crate::fixups::upstream_bugs::required_properties::config_map_projection,
@@ -63,6 +69,7 @@ impl SupportedVersion {
6369
crate::fixups::upstream_bugs::connect_options_gvk,
6470
crate::fixups::upstream_bugs::optional_properties::appsv1_statefulsetspec,
6571
crate::fixups::upstream_bugs::optional_properties::eventsv1_event,
72+
crate::fixups::upstream_bugs::optional_properties::networkingv1_networkpolicyspec,
6673
crate::fixups::upstream_bugs::required_properties::config_map_env_source,
6774
crate::fixups::upstream_bugs::required_properties::config_map_key_selector,
6875
crate::fixups::upstream_bugs::required_properties::config_map_projection,
@@ -77,6 +84,7 @@ impl SupportedVersion {
7784
crate::fixups::upstream_bugs::connect_options_gvk,
7885
crate::fixups::upstream_bugs::optional_properties::appsv1_statefulsetspec,
7986
crate::fixups::upstream_bugs::optional_properties::eventsv1_event,
87+
crate::fixups::upstream_bugs::optional_properties::networkingv1_networkpolicyspec,
8088
crate::fixups::upstream_bugs::required_properties::config_map_env_source,
8189
crate::fixups::upstream_bugs::required_properties::config_map_key_selector,
8290
crate::fixups::upstream_bugs::required_properties::config_map_projection,
@@ -88,6 +96,20 @@ impl SupportedVersion {
8896
],
8997

9098
SupportedVersion::V1_33 => &[
99+
crate::fixups::upstream_bugs::connect_options_gvk,
100+
crate::fixups::upstream_bugs::optional_properties::eventsv1_event,
101+
crate::fixups::upstream_bugs::optional_properties::networkingv1_networkpolicyspec,
102+
crate::fixups::upstream_bugs::required_properties::config_map_env_source,
103+
crate::fixups::upstream_bugs::required_properties::config_map_key_selector,
104+
crate::fixups::upstream_bugs::required_properties::config_map_projection,
105+
crate::fixups::upstream_bugs::required_properties::config_map_volume_source,
106+
crate::fixups::upstream_bugs::required_properties::local_object_reference,
107+
crate::fixups::upstream_bugs::required_properties::secret_env_source,
108+
crate::fixups::upstream_bugs::required_properties::secret_key_selector,
109+
crate::fixups::upstream_bugs::required_properties::secret_projection,
110+
],
111+
112+
SupportedVersion::V1_34 => &[
91113
crate::fixups::upstream_bugs::connect_options_gvk,
92114
crate::fixups::upstream_bugs::optional_properties::eventsv1_event,
93115
crate::fixups::upstream_bugs::required_properties::config_map_env_source,

k8s-openapi-tests-macro-deps/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ test_v1_30 = ["k8s-openapi/v1_30"]
2323
test_v1_31 = ["k8s-openapi/v1_31"]
2424
test_v1_32 = ["k8s-openapi/v1_32"]
2525
test_v1_33 = ["k8s-openapi/v1_33"]
26+
test_v1_34 = ["k8s-openapi/v1_34"]

k8s-openapi-tests/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ test_v1_30 = ["k8s-openapi/v1_30"]
5757
test_v1_31 = ["k8s-openapi/v1_31"]
5858
test_v1_32 = ["k8s-openapi/v1_32"]
5959
test_v1_33 = ["k8s-openapi/v1_33"]
60+
test_v1_34 = ["k8s-openapi/v1_34"]

k8s-openapi-tests/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn main() {
44
// Assert that the DEP_K8S_OPENAPI_*_VERSION is set by the k8s-openapi crate's build script correctly.
55

66
const MIN: usize = 30;
7-
const MAX: usize = 33;
7+
const MAX: usize = 34;
88

99
let enabled_version = {
1010
let mut enabled_versions = (MIN..=MAX).filter(|v| std::env::var(format!("CARGO_FEATURE_TEST_V1_{v}")).is_ok());

k8s-openapi-tests/src/deployment.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,29 @@ async fn list() {
3737
.labels.expect("couldn't get dns deployment spec template metadata labels");
3838
assert_eq!(dns_deployment_spec_template_metadata_labels.remove("k8s-app"), Some("kube-dns".to_string()));
3939

40-
let dns_container_liveness_probe_http_get_action =
40+
let dns_container =
4141
dns_deployment_spec_template
4242
.spec.expect("couldn't get dns deployment spec template spec")
4343
.containers
44-
.into_iter().find(|container| container.name == "coredns").expect("couldn't get dns container spec")
44+
.into_iter().find(|container| container.name == "coredns").expect("couldn't get dns container spec");
45+
46+
let dns_container_liveness_probe_http_get_action =
47+
dns_container
4548
.liveness_probe.expect("couldn't get dns container spec liveness probe")
4649
.http_get.expect("couldn't get dns container spec liveness probe HTTP get action");
4750

4851
assert_eq!(dns_container_liveness_probe_http_get_action.path, Some("/health".to_string()));
49-
assert_eq!(dns_container_liveness_probe_http_get_action.port, util::intstr::IntOrString::Int(8080));
52+
let port = match &dns_container_liveness_probe_http_get_action.port {
53+
util::intstr::IntOrString::Int(port) => *port,
54+
util::intstr::IntOrString::String(port_name) =>
55+
dns_container.ports
56+
.into_iter()
57+
.flatten()
58+
.find(|port| port.name.as_ref() == Some(port_name))
59+
.expect("could not find named port")
60+
.container_port,
61+
};
62+
assert_eq!(port, 8080);
5063

5164
let dns_deployment_status = dns_deployment.status.expect("couldn't get dns deployment status");
5265
assert!(dns_deployment_status.replicas > Some(0));

k8s-openapi-tests/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl Client {
4949
#[cfg(feature = "test_v1_31")] let replays_directory = "v1-31";
5050
#[cfg(feature = "test_v1_32")] let replays_directory = "v1-32";
5151
#[cfg(feature = "test_v1_33")] let replays_directory = "v1-33";
52+
#[cfg(feature = "test_v1_34")] let replays_directory = "v1-34";
5253

5354
let replays_directory =
5455
std::path::Path::new(concat!(env!("CARGO_MANIFEST_DIR")))

0 commit comments

Comments
 (0)