Skip to content

Commit 478d7c4

Browse files
hligitpront
andauthored
chore(deps): bump kube from 0.93.0 to 3.0.1 and k8s-openapi from 0.22.0 to 0.27.0 (#24787)
Upgrade Kubernetes client libraries to their latest releases, bringing support for Kubernetes API versions up to v1.35. Also bumps k8s-openapi in the e2e test crates from 0.16.0 to 0.27.0. Notable adjustments for API changes: - k8s-openapi: PodIP.ip changed from Option<String> to String - k8s-openapi: PodAffinityTerm gained new required fields - k8s-openapi: minimum supported k8s feature flag is now v1_31 - Transitive dependency changes: backoff replaced by backon, chrono replaced by jiff, derivative replaced by educe Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>
1 parent 40f94ee commit 478d7c4

8 files changed

Lines changed: 146 additions & 140 deletions

File tree

Cargo.lock

Lines changed: 124 additions & 125 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ indexmap.workspace = true
396396
inventory = { version = "0.3.20", default-features = false }
397397
ipnet = { version = "2", default-features = false, optional = true, features = ["serde", "std"] }
398398
itertools.workspace = true
399-
k8s-openapi = { version = "0.22.0", default-features = false, features = ["v1_26"], optional = true }
400-
kube = { version = "0.93.0", default-features = false, features = ["client", "openssl-tls", "runtime"], optional = true }
399+
k8s-openapi = { version = "0.27.0", default-features = false, features = ["v1_31"], optional = true }
400+
kube = { version = "3.0.1", default-features = false, features = ["client", "openssl-tls", "runtime"], optional = true }
401401
listenfd = { version = "1.0.2", default-features = false, optional = true }
402402
lru = { version = "0.16.3", default-features = false }
403403
maxminddb = { version = "0.27.0", default-features = false, optional = true, features = ["simdutf8"] }

LICENSE-3rdparty.csv

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ azure_core,https://github.com/azure/azure-sdk-for-rust,MIT,Microsoft
104104
azure_core_macros,https://github.com/azure/azure-sdk-for-rust,MIT,Microsoft
105105
azure_identity,https://github.com/azure/azure-sdk-for-rust,MIT,Microsoft
106106
azure_storage_blob,https://github.com/azure/azure-sdk-for-rust,MIT,Microsoft
107-
backoff,https://github.com/ihrwein/backoff,MIT OR Apache-2.0,Tibor Benke <ihrwein@gmail.com>
108107
backon,https://github.com/Xuanwo/backon,Apache-2.0,The backon Authors
109108
base16,https://github.com/thomcc/rust-base16,CC0-1.0,Thom Chiovoloni <tchiovoloni@mozilla.com>
110109
base16ct,https://github.com/RustCrypto/formats/tree/master/base16ct,Apache-2.0 OR MIT,RustCrypto Developers
@@ -247,13 +246,16 @@ dyn-clone,https://github.com/dtolnay/dyn-clone,MIT OR Apache-2.0,David Tolnay <d
247246
ecdsa,https://github.com/RustCrypto/signatures/tree/master/ecdsa,Apache-2.0 OR MIT,RustCrypto Developers
248247
ed25519,https://github.com/RustCrypto/signatures/tree/master/ed25519,Apache-2.0 OR MIT,RustCrypto Developers
249248
ed25519-dalek,https://github.com/dalek-cryptography/ed25519-dalek,BSD-3-Clause,"isis lovecruft <isis@patternsinthevoid.net>, Tony Arcieri <bascule@gmail.com>, Michael Rosenberg <michael@mrosenberg.pub>"
249+
educe,https://github.com/magiclen/educe,MIT,Magic Len <len@magiclen.org>
250250
either,https://github.com/bluss/either,MIT OR Apache-2.0,bluss
251251
elliptic-curve,https://github.com/RustCrypto/traits/tree/master/elliptic-curve,Apache-2.0 OR MIT,RustCrypto Developers
252252
email_address,https://github.com/johnstonskj/rust-email_address,MIT,Simon Johnston <johnstonskj@gmail.com>
253253
encode_unicode,https://github.com/tormol/encode_unicode,Apache-2.0 OR MIT,Torbjørn Birch Moltu <t.b.moltu@lyse.net>
254254
encoding_rs,https://github.com/hsivonen/encoding_rs,(Apache-2.0 OR MIT) AND BSD-3-Clause,Henri Sivonen <hsivonen@hsivonen.fi>
255255
endian-type,https://github.com/Lolirofle/endian-type,MIT,Lolirofle <lolipopple@hotmail.com>
256256
enum-as-inner,https://github.com/bluejekyll/enum-as-inner,MIT OR Apache-2.0,Benjamin Fry <benjaminfry@me.com>
257+
enum-ordinalize,https://github.com/magiclen/enum-ordinalize,MIT,The enum-ordinalize Authors
258+
enum-ordinalize-derive,https://github.com/magiclen/enum-ordinalize,MIT,The enum-ordinalize-derive Authors
257259
enum_dispatch,https://gitlab.com/antonok/enum_dispatch,MIT OR Apache-2.0,Anton Lazarev <https://antonok.com>
258260
enumflags2,https://github.com/meithecatte/enumflags2,MIT OR Apache-2.0,"maik klein <maikklein@googlemail.com>, Maja Kądziołka <maya@compilercrim.es>"
259261
enumflags2_derive,https://github.com/meithecatte/enumflags2,MIT OR Apache-2.0,"maik klein <maikklein@googlemail.com>, Maja Kądziołka <maya@compilercrim.es>"
@@ -400,12 +402,14 @@ is-terminal,https://github.com/sunfishcode/is-terminal,MIT,"softprops <d.tangren
400402
is_ci,https://github.com/zkat/is_ci,ISC,Kat Marchán <kzm@zkat.tech>
401403
itertools,https://github.com/rust-itertools/itertools,MIT OR Apache-2.0,bluss
402404
itoa,https://github.com/dtolnay/itoa,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
405+
jiff,https://github.com/BurntSushi/jiff,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
406+
jiff-static,https://github.com/BurntSushi/jiff,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
403407
jni,https://github.com/jni-rs/jni-rs,MIT OR Apache-2.0,Josh Chase <josh@prevoty.com>
404408
jni-sys,https://github.com/sfackler/rust-jni-sys,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
405409
js-sys,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
406410
json-patch,https://github.com/idubrov/json-patch,MIT OR Apache-2.0,Ivan Dubrov <dubrov.ivan@gmail.com>
407411
jsonpath-rust,https://github.com/besok/jsonpath-rust,MIT,BorisZhguchev <zhguchev@gmail.com>
408-
jsonptr,https://github.com/chanced/jsonptr,MIT OR Apache-2.0,chance dinkins
412+
jsonptr,https://github.com/chanced/jsonptr,MIT OR Apache-2.0,"chance dinkins, André Sá de Mello <codasm@pm.me>, Oliver Wangler <oliver@wngr.de>"
409413
jsonschema,https://github.com/Stranger6667/jsonschema,MIT,Dmitry Dygalo <dmitry@dygalo.dev>
410414
k8s-openapi,https://github.com/Arnavion/k8s-openapi,Apache-2.0,Arnav Singh <me@arnavion.dev>
411415
kasuari,https://github.com/ratatui/kasuari,MIT OR Apache-2.0,"Dylan Ede <dylanede@googlemail.com>, The Ratatui Developers"
@@ -568,6 +572,7 @@ polling,https://github.com/smol-rs/polling,Apache-2.0 OR MIT,Stjepan Glavina <st
568572
polling,https://github.com/smol-rs/polling,Apache-2.0 OR MIT,"Stjepan Glavina <stjepang@gmail.com>, John Nunley <dev@notgull.net>"
569573
poly1305,https://github.com/RustCrypto/universal-hashes,Apache-2.0 OR MIT,RustCrypto Developers
570574
portable-atomic,https://github.com/taiki-e/portable-atomic,Apache-2.0 OR MIT,The portable-atomic Authors
575+
portable-atomic-util,https://github.com/taiki-e/portable-atomic,Apache-2.0 OR MIT,The portable-atomic-util Authors
571576
postgres-openssl,https://github.com/rust-postgres/rust-postgres,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
572577
postgres-protocol,https://github.com/rust-postgres/rust-postgres,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
573578
postgres-types,https://github.com/rust-postgres/rust-postgres,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bumped `kube` dependency from 0.93.0 to 3.0.1 and `k8s-openapi` from 0.22.0 to 0.27.0, adding support for Kubernetes API versions up to v1.35.
2+
authors: hligit

lib/k8s-e2e-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MPL-2.0"
99

1010
[dependencies]
1111
futures.workspace = true
12-
k8s-openapi = { version = "0.16.0", default-features = false, features = ["v1_19"] }
12+
k8s-openapi = { version = "0.27.0", default-features = false, features = ["v1_31"] }
1313
k8s-test-framework = { version = "0.1", path = "../k8s-test-framework" }
1414
regex = { workspace = true, default-features = true }
1515
reqwest.workspace = true

lib/k8s-e2e-tests/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ pub fn make_test_pod_with_affinity<'a>(
186186
label_selector: Some(selector),
187187
namespaces: Some(vec![affinity_namespace.unwrap_or(namespace).to_string()]),
188188
topology_key: "kubernetes.io/hostname".to_string(),
189+
match_label_keys: None,
190+
mismatch_label_keys: None,
191+
namespace_selector: None,
189192
}]),
190193
}),
191194
pod_anti_affinity: None,

lib/k8s-test-framework/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ publish = false
88
license = "MPL-2.0"
99

1010
[dependencies]
11-
k8s-openapi = { version = "0.16.0", default-features = false, features = ["v1_19"] }
11+
k8s-openapi = { version = "0.27.0", default-features = false, features = ["v1_31"] }
1212
serde_json.workspace = true
1313
tempfile.workspace = true
1414
tokio = { workspace = true, features = ["full"] }

src/sources/kubernetes_logs/pod_metadata_annotator.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,7 @@ fn annotate_from_pod_status(
407407
.map(|k| &k.path)
408408
.map(LegacyKey::Overwrite);
409409

410-
let value = value
411-
.iter()
412-
.filter_map(|k| k.ip.clone())
413-
.collect::<Vec<String>>();
410+
let value = value.iter().map(|k| k.ip.clone()).collect::<Vec<String>>();
414411

415412
log_namespace.insert_source_metadata(Config::NAME, log, legacy_key, path!("pod_ips"), value)
416413
}
@@ -889,7 +886,7 @@ mod tests {
889886
FieldsSpec::default(),
890887
PodStatus {
891888
pod_ips: Some(vec![PodIP {
892-
ip: Some("192.168.1.2".to_owned()),
889+
ip: "192.168.1.2".to_owned(),
893890
}]),
894891
..Default::default()
895892
},
@@ -919,10 +916,10 @@ mod tests {
919916
pod_ip: Some("192.168.1.2".to_owned()),
920917
pod_ips: Some(vec![
921918
PodIP {
922-
ip: Some("192.168.1.2".to_owned()),
919+
ip: "192.168.1.2".to_owned(),
923920
},
924921
PodIP {
925-
ip: Some("192.168.1.3".to_owned()),
922+
ip: "192.168.1.3".to_owned(),
926923
},
927924
]),
928925
..Default::default()
@@ -945,10 +942,10 @@ mod tests {
945942
pod_ip: Some("192.168.1.2".to_owned()),
946943
pod_ips: Some(vec![
947944
PodIP {
948-
ip: Some("192.168.1.2".to_owned()),
945+
ip: "192.168.1.2".to_owned(),
949946
},
950947
PodIP {
951-
ip: Some("192.168.1.3".to_owned()),
948+
ip: "192.168.1.3".to_owned(),
952949
},
953950
]),
954951
..Default::default()

0 commit comments

Comments
 (0)