From a868bbf92d36dc34acb85d308d82753dc9d9fd3b Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 27 Mar 2024 22:23:00 +0900 Subject: [PATCH 01/12] remove resolved cargo-deny config (#1446) Signed-off-by: tottoto --- deny.toml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/deny.toml b/deny.toml index 791eab902..b8d32fdaa 100644 --- a/deny.toml +++ b/deny.toml @@ -10,19 +10,6 @@ vulnerability = "deny" unmaintained = "warn" yanked = "warn" notice = "warn" -ignore = [ - # Ignoring issues related to `localtime_r` for now - # See https://github.com/kube-rs/kube/issues/650 - # - # Potential segfault in the `time` crate - # Tracking issue: https://github.com/kube-rs/kube/issues/656 - # PR to update `time`: https://github.com/chronotope/chrono/pull/578 - "RUSTSEC-2020-0071", - # Potential segfault in `localtime_r` invocations - # Tracking issue: https://github.com/kube-rs/kube/issues/660 - # Upstream issue: https://github.com/chronotope/chrono/issues/499 - "RUSTSEC-2020-0159", -] [licenses] @@ -41,7 +28,6 @@ allow = [ "BSD-3-Clause", "ISC", "LicenseRef-ring", - "LicenseRef-webpki", ] exceptions = [ @@ -61,22 +47,6 @@ license-files = [ { path = "LICENSE", hash = 0xbd0eed23 }, ] - -[[licenses.clarify]] -name = "webpki" -expression = "LicenseRef-webpki" -license-files = [ - { path = "LICENSE", hash = 0x001c7e6c }, -] - -# rustls' webpki fork uses same license https://github.com/rustls/webpki -[[licenses.clarify]] -name = "rustls-webpki" -expression = "LicenseRef-webpki" -license-files = [ - { path = "LICENSE", hash = 0x001c7e6c }, -] - [sources] unknown-registry = "deny" unknown-git = "deny" @@ -98,14 +68,6 @@ name = "syn" # https://github.com/jcreekmore/pem-rs/blob/master/Cargo.toml#L16 name = "base64" -[[bans.skip]] -# used by h2->hyper->hyper-openssl (we have latest) -# newer used by serde_json -name = "indexmap" -[[bans.skip]] -# via indexmap - have to also skip this -name = "hashbrown" - [[bans.skip]] # latest via openssl->hyper-openssl (we have latest) # newer via tower-http (we have latest) @@ -117,7 +79,3 @@ name = "redox_syscall" [[bans.skip-tree]] name = "windows-sys" - -[[bans.skip]] -# deep in dependency tree, dual use via tokio and hyper (needs a bump there) -name = "socket2" From d6c620328c8594f1b575a1d79c98af94ca36f9a0 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 27 Mar 2024 22:33:55 +0900 Subject: [PATCH 02/12] replace once_cell Lazy with ordinary static Signed-off-by: tottoto --- Cargo.toml | 1 - kube-core/Cargo.toml | 1 - kube-core/src/resource.rs | 9 +++------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0c12782bd..e4c052f2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,6 @@ hyper-timeout = "0.5.1" json-patch = "1.0.0" jsonpath-rust = "0.5.0" k8s-openapi = { version = "0.21.0", default-features = false } -once_cell = "1.8.0" openssl = "0.10.36" parking_lot = "0.12.0" pem = "3.0.1" diff --git a/kube-core/Cargo.toml b/kube-core/Cargo.toml index 8fb7fb68d..0ce4277e6 100644 --- a/kube-core/Cargo.toml +++ b/kube-core/Cargo.toml @@ -32,7 +32,6 @@ thiserror.workspace = true form_urlencoded.workspace = true http.workspace = true json-patch = { workspace = true, optional = true } -once_cell.workspace = true chrono = { workspace = true, features = ["clock"] } schemars = { workspace = true, optional = true } k8s-openapi.workspace = true diff --git a/kube-core/src/resource.rs b/kube-core/src/resource.rs index 4b159b3bc..82a6f5570 100644 --- a/kube-core/src/resource.rs +++ b/kube-core/src/resource.rs @@ -216,10 +216,7 @@ pub trait ResourceExt: Resource { fn managed_fields_mut(&mut self) -> &mut Vec; } -// TODO: replace with ordinary static when BTreeMap::new() is no longer -// const-unstable. -use once_cell::sync::Lazy; -static EMPTY_MAP: Lazy> = Lazy::new(BTreeMap::new); +static EMPTY_MAP: BTreeMap = BTreeMap::new(); impl ResourceExt for K { fn name_unchecked(&self) -> String { @@ -251,7 +248,7 @@ impl ResourceExt for K { } fn labels(&self) -> &BTreeMap { - self.meta().labels.as_ref().unwrap_or(&*EMPTY_MAP) + self.meta().labels.as_ref().unwrap_or(&EMPTY_MAP) } fn labels_mut(&mut self) -> &mut BTreeMap { @@ -259,7 +256,7 @@ impl ResourceExt for K { } fn annotations(&self) -> &BTreeMap { - self.meta().annotations.as_ref().unwrap_or(&*EMPTY_MAP) + self.meta().annotations.as_ref().unwrap_or(&EMPTY_MAP) } fn annotations_mut(&mut self) -> &mut BTreeMap { From ff5a9e4d1348b1129123a5df24331ea6047468f9 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 28 Mar 2024 19:31:23 +0900 Subject: [PATCH 03/12] replace chrono feature clock with now (#1448) Signed-off-by: tottoto --- Cargo.toml | 2 +- kube-core/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e4c052f2d..fd0262cbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ async-trait = "0.1.64" backoff = "0.4.0" base64 = "0.22.0" bytes = "1.1.0" -chrono = { version = "0.4.23", default-features = false } +chrono = { version = "0.4.32", default-features = false } darling = "0.20.3" derivative = "2.1.1" either = "1.6.1" diff --git a/kube-core/Cargo.toml b/kube-core/Cargo.toml index 0ce4277e6..9b38f0335 100644 --- a/kube-core/Cargo.toml +++ b/kube-core/Cargo.toml @@ -32,7 +32,7 @@ thiserror.workspace = true form_urlencoded.workspace = true http.workspace = true json-patch = { workspace = true, optional = true } -chrono = { workspace = true, features = ["clock"] } +chrono = { workspace = true, features = ["now"] } schemars = { workspace = true, optional = true } k8s-openapi.workspace = true From 02c99f28f222a2da630d7696352ec035675b6b9f Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 31 Mar 2024 01:33:35 +0900 Subject: [PATCH 04/12] implement http body trait method (#1452) Signed-off-by: tottoto --- kube-client/src/client/body.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/kube-client/src/client/body.rs b/kube-client/src/client/body.rs index 62adcffdd..1d4186992 100644 --- a/kube-client/src/client/body.rs +++ b/kube-client/src/client/body.rs @@ -7,7 +7,7 @@ use std::{ use bytes::Bytes; use futures::stream::Stream; -use http_body::{Body as HttpBody, Frame}; +use http_body::{Body as HttpBody, Frame, SizeHint}; use http_body_util::{combinators::UnsyncBoxBody, BodyExt}; use pin_project::pin_project; @@ -84,6 +84,22 @@ impl HttpBody for Body { ), } } + + fn size_hint(&self) -> SizeHint { + match &self.kind { + Kind::Once(Some(bytes)) => SizeHint::with_exact(bytes.len() as u64), + Kind::Once(None) => SizeHint::with_exact(0), + Kind::Wrap(body) => body.size_hint(), + } + } + + fn is_end_stream(&self) -> bool { + match &self.kind { + Kind::Once(Some(bytes)) => bytes.is_empty(), + Kind::Once(None) => true, + Kind::Wrap(body) => body.is_end_stream(), + } + } } // Wrap `http_body::Body` to implement `Stream`. From 49ef1124487f6cb26f2c5da57c594d19e99ed92d Mon Sep 17 00:00:00 2001 From: tottoto Date: Mon, 1 Apr 2024 01:54:39 +0900 Subject: [PATCH 05/12] refactor converting body to data stream (#1453) Signed-off-by: tottoto --- kube-client/src/client/body.rs | 18 +++++++----------- kube-client/src/client/mod.rs | 26 +++++++++----------------- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/kube-client/src/client/body.rs b/kube-client/src/client/body.rs index 1d4186992..bc81121d5 100644 --- a/kube-client/src/client/body.rs +++ b/kube-client/src/client/body.rs @@ -44,6 +44,13 @@ impl Body { { Body::new(Kind::Wrap(body.map_err(Into::into).boxed_unsync())) } + + pub(crate) fn into_stream(self) -> BodyDataStream + where + Self: Sized, + { + BodyDataStream::new(self) + } } impl From for Body { @@ -136,14 +143,3 @@ where } } } - -pub trait IntoBodyDataStream: HttpBody { - fn into_stream(self) -> BodyDataStream - where - Self: Sized, - { - BodyDataStream::new(self) - } -} - -impl IntoBodyDataStream for T where T: HttpBody {} diff --git a/kube-client/src/client/mod.rs b/kube-client/src/client/mod.rs index d17da9679..b284816c8 100644 --- a/kube-client/src/client/mod.rs +++ b/kube-client/src/client/mod.rs @@ -31,8 +31,6 @@ use crate::{api::WatchEvent, error::ErrorResponse, Config, Error, Result}; mod auth; mod body; mod builder; -// Add `into_stream()` to `http::Body` -use body::IntoBodyDataStream as _; #[cfg_attr(docsrs, doc(cfg(feature = "unstable-client")))] #[cfg(feature = "unstable-client")] mod client_ext; @@ -271,10 +269,7 @@ impl Client { let res = handle_api_errors(res).await?; // Map the error, since we want to convert this into an `AsyncBufReader` using // `into_async_read` which specifies `std::io::Error` as the stream's error type. - let body = BodyExt::map_err(res.into_body(), |e| { - std::io::Error::new(std::io::ErrorKind::Other, e) - }) - .into_stream(); + let body = res.into_body().into_stream().map_err(std::io::Error::other); Ok(body.into_async_read()) } @@ -314,17 +309,14 @@ impl Client { tracing::trace!("headers: {:?}", res.headers()); let frames = FramedRead::new( - StreamReader::new( - BodyExt::map_err(res.into_body(), |e| { - // Unexpected EOF from chunked decoder. - // Tends to happen when watching for 300+s. This will be ignored. - if e.to_string().contains("unexpected EOF during chunk") { - return std::io::Error::new(std::io::ErrorKind::UnexpectedEof, e); - } - std::io::Error::new(std::io::ErrorKind::Other, e) - }) - .into_stream(), - ), + StreamReader::new(res.into_body().into_stream().map_err(|e| { + // Unexpected EOF from chunked decoder. + // Tends to happen when watching for 300+s. This will be ignored. + if e.to_string().contains("unexpected EOF during chunk") { + return std::io::Error::new(std::io::ErrorKind::UnexpectedEof, e); + } + std::io::Error::other(e) + })), LinesCodec::new(), ); From 156a6e677ddcf923a510f0113d8dc68eb5b63283 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Sun, 31 Mar 2024 17:55:03 +0100 Subject: [PATCH 06/12] Fix examples for custom clients not authenticating (#1450) Signed-off-by: clux --- examples/custom_client_tls.rs | 2 ++ examples/custom_client_trace.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/examples/custom_client_tls.rs b/examples/custom_client_tls.rs index 659772ebf..5b271e04f 100644 --- a/examples/custom_client_tls.rs +++ b/examples/custom_client_tls.rs @@ -20,12 +20,14 @@ async fn main() -> anyhow::Result<()> { let https = config.openssl_https_connector()?; let service = ServiceBuilder::new() .layer(config.base_uri_layer()) + .option_layer(config.auth_layer()?) .service(hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(https)); Client::new(service, config.default_namespace) } else { let https = config.rustls_https_connector()?; let service = ServiceBuilder::new() .layer(config.base_uri_layer()) + .option_layer(config.auth_layer()?) .service(hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(https)); Client::new(service, config.default_namespace) }; diff --git a/examples/custom_client_trace.rs b/examples/custom_client_trace.rs index 573e6750e..866a5dbd3 100644 --- a/examples/custom_client_trace.rs +++ b/examples/custom_client_trace.rs @@ -26,6 +26,7 @@ async fn main() -> anyhow::Result<()> { .layer(tower::limit::ConcurrencyLimitLayer::new(4)) // Add `DecompressionLayer` to make request headers interesting. .layer(DecompressionLayer::new()) + .option_layer(config.auth_layer()?) .layer( // Attribute names follow [Semantic Conventions]. // [Semantic Conventions]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client From 05d115be41ae67a5097f08b52b5f9e5fd730bd42 Mon Sep 17 00:00:00 2001 From: tottoto Date: Mon, 1 Apr 2024 23:32:10 +0900 Subject: [PATCH 07/12] refactor: remove BodyDataStream (#1455) Signed-off-by: tottoto --- kube-client/Cargo.toml | 3 +-- kube-client/src/client/body.rs | 49 +++++----------------------------- kube-client/src/client/mod.rs | 4 +-- 3 files changed, 9 insertions(+), 47 deletions(-) diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index b8cf5e0fc..3007cbdd6 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -20,7 +20,7 @@ kubelet-debug = ["ws", "kube-core/kubelet-debug"] oauth = ["client", "tame-oauth"] oidc = ["client", "form_urlencoded"] gzip = ["client", "tower-http/decompression-gzip"] -client = ["config", "__non_core", "hyper", "hyper-util", "http-body", "http-body-util", "tower", "tower-http", "hyper-timeout", "pin-project", "chrono", "jsonpath-rust", "bytes", "futures", "tokio", "tokio-util", "either"] +client = ["config", "__non_core", "hyper", "hyper-util", "http-body", "http-body-util", "tower", "tower-http", "hyper-timeout", "chrono", "jsonpath-rust", "bytes", "futures", "tokio", "tokio-util", "either"] jsonpatch = ["kube-core/jsonpatch"] admission = ["kube-core/admission"] config = ["__non_core", "pem", "home"] @@ -69,7 +69,6 @@ tower = { workspace = true, features = ["buffer", "filter", "util"], optional = tower-http = { workspace = true, features = ["auth", "map-response-body", "trace"], optional = true } hyper-timeout = { workspace = true, optional = true } tame-oauth = { workspace = true, features = ["gcp"], optional = true } -pin-project = { workspace = true, optional = true } rand = { workspace = true, optional = true } secrecy = { workspace = true, features = ["alloc", "serde"] } tracing = { workspace = true, features = ["log"], optional = true } diff --git a/kube-client/src/client/body.rs b/kube-client/src/client/body.rs index bc81121d5..1a0475f33 100644 --- a/kube-client/src/client/body.rs +++ b/kube-client/src/client/body.rs @@ -6,10 +6,9 @@ use std::{ }; use bytes::Bytes; -use futures::stream::Stream; +use futures::{stream::Stream, TryStreamExt}; use http_body::{Body as HttpBody, Frame, SizeHint}; -use http_body_util::{combinators::UnsyncBoxBody, BodyExt}; -use pin_project::pin_project; +use http_body_util::{combinators::UnsyncBoxBody, BodyExt, BodyStream}; /// A request body. pub struct Body { @@ -45,11 +44,10 @@ impl Body { Body::new(Kind::Wrap(body.map_err(Into::into).boxed_unsync())) } - pub(crate) fn into_stream(self) -> BodyDataStream - where - Self: Sized, - { - BodyDataStream::new(self) + pub(crate) fn into_data_stream( + self, + ) -> impl Stream::Data, ::Error>> { + Box::pin(BodyStream::new(self).try_filter_map(|frame| async { Ok(frame.into_data().ok()) })) } } @@ -108,38 +106,3 @@ impl HttpBody for Body { } } } - -// Wrap `http_body::Body` to implement `Stream`. -#[pin_project] -pub struct BodyDataStream { - #[pin] - body: B, -} - -impl BodyDataStream { - pub(crate) fn new(body: B) -> Self { - Self { body } - } -} - -impl Stream for BodyDataStream -where - B: HttpBody, -{ - type Item = Result; - - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { - loop { - return match ready!(self.as_mut().project().body.poll_frame(cx)) { - Some(Ok(frame)) => { - let Ok(bytes) = frame.into_data() else { - continue; - }; - Poll::Ready(Some(Ok(bytes))) - } - Some(Err(err)) => Poll::Ready(Some(Err(err))), - None => Poll::Ready(None), - }; - } - } -} diff --git a/kube-client/src/client/mod.rs b/kube-client/src/client/mod.rs index b284816c8..300a3bb81 100644 --- a/kube-client/src/client/mod.rs +++ b/kube-client/src/client/mod.rs @@ -269,7 +269,7 @@ impl Client { let res = handle_api_errors(res).await?; // Map the error, since we want to convert this into an `AsyncBufReader` using // `into_async_read` which specifies `std::io::Error` as the stream's error type. - let body = res.into_body().into_stream().map_err(std::io::Error::other); + let body = res.into_body().into_data_stream().map_err(std::io::Error::other); Ok(body.into_async_read()) } @@ -309,7 +309,7 @@ impl Client { tracing::trace!("headers: {:?}", res.headers()); let frames = FramedRead::new( - StreamReader::new(res.into_body().into_stream().map_err(|e| { + StreamReader::new(res.into_body().into_data_stream().map_err(|e| { // Unexpected EOF from chunked decoder. // Tends to happen when watching for 300+s. This will be ignored. if e.to_string().contains("unexpected EOF during chunk") { From 067b68d935ef193bf886f8fd4c4912c0184fa4f9 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 3 Apr 2024 03:41:52 +0900 Subject: [PATCH 08/12] update to rustls 0.23 (#1457) Signed-off-by: tottoto --- Cargo.toml | 4 ++-- kube-client/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fd0262cbb..7827a8af9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ http-body-util = "0.1.1" hyper = "1.2.0" hyper-util = "0.1.3" hyper-openssl = "0.10.2" -hyper-rustls = "0.26.0" +hyper-rustls = { version = "0.27.0", default-features = false } hyper-socks2 = { version = "0.9.0", default-features = false } hyper-timeout = "0.5.1" json-patch = "1.0.0" @@ -65,7 +65,7 @@ pin-project = "1.0.4" proc-macro2 = "1.0.29" quote = "1.0.10" rand = "0.8.3" -rustls = "0.22.0" +rustls = { version = "0.23.0", default-features = false } rustls-pemfile = "2.0.0" schemars = "0.8.6" secrecy = "0.8.0" diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index 3007cbdd6..e480066c8 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -62,7 +62,7 @@ jsonpath-rust = { workspace = true, optional = true } tokio-util = { workspace = true, features = ["io", "codec"], optional = true } hyper = { workspace = true, features = ["client", "http1"], optional = true } hyper-util = { workspace = true, features = ["client", "client-legacy", "http1", "tokio"], optional = true } -hyper-rustls = { workspace = true, optional = true } +hyper-rustls = { workspace = true, features = ["http1", "logging", "native-tokio", "ring", "tls12"], optional = true } hyper-socks2 = { workspace = true, optional = true } tokio-tungstenite = { workspace = true, optional = true } tower = { workspace = true, features = ["buffer", "filter", "util"], optional = true } From db7878e36f381d2d881c84fe338f9432b3a49c66 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Tue, 2 Apr 2024 19:43:21 +0100 Subject: [PATCH 09/12] Add proxy `Body::collect_bytes` for easier unit tests (#1445) * Expose `Body::collect` for easier unit tests Avoids people having to pull in `http_body_util` for the `BodyExt` Signed-off-by: clux * avoid opaque Collect and Collected and await + into_bytes instead Signed-off-by: clux * Update kube-client/src/client/body.rs Co-authored-by: Matei David Signed-off-by: Eirik A * Update kube-client/src/client/body.rs Co-authored-by: Matei David Signed-off-by: Eirik A --------- Signed-off-by: clux Signed-off-by: Eirik A Co-authored-by: Matei David --- kube-client/src/client/body.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kube-client/src/client/body.rs b/kube-client/src/client/body.rs index 1a0475f33..981d685db 100644 --- a/kube-client/src/client/body.rs +++ b/kube-client/src/client/body.rs @@ -44,6 +44,11 @@ impl Body { Body::new(Kind::Wrap(body.map_err(Into::into).boxed_unsync())) } + /// Collect all the data frames and trailers of the request body + pub async fn collect_bytes(self) -> Result { + Ok(self.collect().await?.to_bytes()) + } + pub(crate) fn into_data_stream( self, ) -> impl Stream::Data, ::Error>> { From c6c14bd795352afc0738305cc0f3bf23b130b224 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Tue, 2 Apr 2024 23:51:40 +0100 Subject: [PATCH 10/12] Set a compatible minimum `chrono` version (#1458) set a more sensible minimum chrono version 0.4.32 won't work anymore. for #1451 Signed-off-by: clux --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7827a8af9..53613e60a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ async-trait = "0.1.64" backoff = "0.4.0" base64 = "0.22.0" bytes = "1.1.0" -chrono = { version = "0.4.32", default-features = false } +chrono = { version = "0.4.34", default-features = false } darling = "0.20.3" derivative = "2.1.1" either = "1.6.1" From 5dce83b7f1882e2f09d7e25cc5928c995caaf904 Mon Sep 17 00:00:00 2001 From: clux Date: Wed, 3 Apr 2024 17:13:08 +0100 Subject: [PATCH 11/12] release 0.90.0 --- CHANGELOG.md | 5 ++++- Cargo.toml | 2 +- README.md | 4 ++-- e2e/Cargo.toml | 2 +- examples/Cargo.toml | 4 ++-- kube-client/Cargo.toml | 2 +- kube-derive/README.md | 2 +- kube-runtime/Cargo.toml | 2 +- kube/Cargo.toml | 8 ++++---- 9 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c5f83a0..eacf97f03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ UNRELEASED =================== - * see https://github.com/kube-rs/kube/compare/0.89.0...main + * see https://github.com/kube-rs/kube/compare/0.90.0...main + +0.90.0 / 2024-04-03 +=================== [0.89.0](https://github.com/kube-rs/kube/releases/tag/0.89.0) / 2024-03-26 =================== diff --git a/Cargo.toml b/Cargo.toml index 53613e60a..01de4b142 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ members = [ ] [workspace.package] -version = "0.89.0" +version = "0.90.0" authors = [ "clux ", "Natalie Klestrup Röijezon ", diff --git a/README.md b/README.md index e5a51c8a9..8aa2f5e79 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Select a version of `kube` along with the generated [k8s-openapi](https://github ```toml [dependencies] -kube = { version = "0.89.0", features = ["runtime", "derive"] } +kube = { version = "0.90.0", features = ["runtime", "derive"] } k8s-openapi = { version = "0.21.1", features = ["latest"] } ``` @@ -152,7 +152,7 @@ By default [rustls](https://github.com/ctz/rustls) is used for TLS, but `openssl ```toml [dependencies] -kube = { version = "0.89.0", default-features = false, features = ["client", "openssl-tls"] } +kube = { version = "0.90.0", default-features = false, features = ["client", "openssl-tls"] } k8s-openapi = { version = "0.21.0", features = ["latest"] } ``` diff --git a/e2e/Cargo.toml b/e2e/Cargo.toml index 41f430d76..864de3223 100644 --- a/e2e/Cargo.toml +++ b/e2e/Cargo.toml @@ -28,7 +28,7 @@ anyhow.workspace = true tracing.workspace = true tracing-subscriber.workspace = true futures.workspace = true -kube = { path = "../kube", version = "^0.89.0", default-features = false, features = ["client", "runtime", "ws", "admission", "gzip"] } +kube = { path = "../kube", version = "^0.90.0", default-features = false, features = ["client", "runtime", "ws", "admission", "gzip"] } k8s-openapi.workspace = true serde_json.workspace = true tokio = { workspace = true, features = ["full"] } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 22a3db7ab..b3b71250f 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -28,8 +28,8 @@ garde = { version = "0.18.0", default-features = false, features = ["derive"] } anyhow.workspace = true futures = { workspace = true, features = ["async-await"] } jsonpath-rust.workspace = true -kube = { path = "../kube", version = "^0.89.0", default-features = false, features = ["admission"] } -kube-derive = { path = "../kube-derive", version = "^0.89.0", default-features = false } # only needed to opt out of schema +kube = { path = "../kube", version = "^0.90.0", default-features = false, features = ["admission"] } +kube-derive = { path = "../kube-derive", version = "^0.90.0", default-features = false } # only needed to opt out of schema k8s-openapi.workspace = true serde = { workspace = true, features = ["derive"] } serde_json.workspace = true diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index e480066c8..7e9b7b1cf 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -57,7 +57,7 @@ rustls = { workspace = true, optional = true } rustls-pemfile = { workspace = true, optional = true } bytes = { workspace = true, optional = true } tokio = { workspace = true, features = ["time", "signal", "sync"], optional = true } -kube-core = { path = "../kube-core", version = "=0.89.0" } +kube-core = { path = "../kube-core", version = "=0.90.0" } jsonpath-rust = { workspace = true, optional = true } tokio-util = { workspace = true, features = ["io", "codec"], optional = true } hyper = { workspace = true, features = ["client", "http1"], optional = true } diff --git a/kube-derive/README.md b/kube-derive/README.md index cae3e4d89..2f7b8c3b4 100644 --- a/kube-derive/README.md +++ b/kube-derive/README.md @@ -6,7 +6,7 @@ Add the `derive` feature to `kube`: ```toml [dependencies] -kube = { version = "0.89.0", feature = ["derive"] } +kube = { version = "0.90.0", feature = ["derive"] } ``` ## Usage diff --git a/kube-runtime/Cargo.toml b/kube-runtime/Cargo.toml index 934427bf7..51e235557 100644 --- a/kube-runtime/Cargo.toml +++ b/kube-runtime/Cargo.toml @@ -31,7 +31,7 @@ rust.unsafe_code = "forbid" [dependencies] futures.workspace = true -kube-client = { path = "../kube-client", version = "=0.89.0", default-features = false, features = ["jsonpatch", "client"] } +kube-client = { path = "../kube-client", version = "=0.90.0", default-features = false, features = ["jsonpatch", "client"] } derivative.workspace = true serde.workspace = true smallvec.workspace = true diff --git a/kube/Cargo.toml b/kube/Cargo.toml index 55e85bd41..e32cc4409 100644 --- a/kube/Cargo.toml +++ b/kube/Cargo.toml @@ -45,10 +45,10 @@ rustdoc-args = ["--cfg", "docsrs"] workspace = true [dependencies] -kube-derive = { path = "../kube-derive", version = "=0.89.0", optional = true } -kube-core = { path = "../kube-core", version = "=0.89.0" } -kube-client = { path = "../kube-client", version = "=0.89.0", default-features = false, optional = true } -kube-runtime = { path = "../kube-runtime", version = "=0.89.0", optional = true} +kube-derive = { path = "../kube-derive", version = "=0.90.0", optional = true } +kube-core = { path = "../kube-core", version = "=0.90.0" } +kube-client = { path = "../kube-client", version = "=0.90.0", default-features = false, optional = true } +kube-runtime = { path = "../kube-runtime", version = "=0.90.0", optional = true} # Not used directly, but required by resolver 2.0 to ensure that the k8s-openapi dependency # is considered part of the "deps" graph rather than just the "dev-deps" graph k8s-openapi.workspace = true From cb77247f1d364434847f225e428520fdcbc03552 Mon Sep 17 00:00:00 2001 From: clux Date: Wed, 3 Apr 2024 17:34:15 +0100 Subject: [PATCH 12/12] changelog import Signed-off-by: clux --- CHANGELOG.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eacf97f03..ba6e95660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,36 @@ UNRELEASED =================== * see https://github.com/kube-rs/kube/compare/0.90.0...main -0.90.0 / 2024-04-03 +[0.90.0](https://github.com/kube-rs/kube/releases/tag/0.90.0) / 2024-04-03 =================== + +## Highlights +### [`kube::client::Body`](https://docs.rs/kube/latest/kube/client/struct.Body.html) Improvements +- Unit testing helpers #1444 + #1445, +- Accuracy; `size_hint` and `is_end_stream` implemented in #1452 + internal cleanups #1453 and #1455 + +### Dependency Cleanups +- `rustls` to 0.23 in #1457 +- `once_cell` removed in #1447 (no longer needed) +- `futures` feature prune in #1442 +- `chrono` features prune in #1448, and bump its min version pin in #1458 + +## What's Changed +### Added +* Add proxy `Body::collect_bytes` for easier unit tests by @clux in https://github.com/kube-rs/kube/pull/1445 +### Changed +* update to `rustls` 0.23 by @tottoto in https://github.com/kube-rs/kube/pull/1457 +### Fixed +* disable unused `futures` feature by @tottoto in https://github.com/kube-rs/kube/pull/1442 +* Expose `Body::empty` for easier tests by @clux in https://github.com/kube-rs/kube/pull/1444 +* replace `once_cell` Lazy with ordinary static by @tottoto in https://github.com/kube-rs/kube/pull/1447 +* replace `chrono` feature `clock` with `now` by @tottoto in https://github.com/kube-rs/kube/pull/1448 +* implement `http_body` trait method by @tottoto in https://github.com/kube-rs/kube/pull/1452 +* Fix examples for custom clients not authenticating by @clux in https://github.com/kube-rs/kube/pull/1450 +* Set a compatible minimum `chrono` version by @clux in https://github.com/kube-rs/kube/pull/1458 + +**Full Changelog**: https://github.com/kube-rs/kube/compare/0.89.0...0.90.0 [0.89.0](https://github.com/kube-rs/kube/releases/tag/0.89.0) / 2024-03-26 ===================