0.64.0
- BREAKING: Replaced feature
kube-derive/schema
with attribute#[kube(schema)]
- #690- If you currently disable default
kube-derive
default features to avoid automatic schema generation, add#[kube(schema = "disabled")]
to your spec struct instead
- If you currently disable default
- BREAKING: Moved
CustomResource
derive crate overrides into subattribute#[kube(crates(...))]
- #690- Replace
#[kube(kube_core = .., k8s_openapi = .., schema = .., serde = .., serde_json = ..)]
with#[kube(crates(kube_core = .., k8s_openapi = .., schema = .., serde = .., serde_json = ..))]
- Replace
- Added
openssl-tls
feature to useopenssl
for TLS on all platforms. Note that, even thoughnative-tls
uses a platform specific TLS,kube
requiresopenssl
on all platforms becausenative-tls
only allows PKCS12 input to load certificates and private key at the moment, and creating PKCS12 requiresopenssl
. - #700 - BREAKING: Changed to fail loading configurations with PEM-encoded certificates containing invalid sections instead of ignoring them. Updated
pem
to 1.0.1. - #702 oauth
: Updatedtame-oauth
to 0.6.0 which supports the same default credentials flow as the Gooauth2
for Google OAuth. In addition to reading the service account information from JSON file specified withGOOGLE_APPLICATION_CREDENTIALS
environment variable, Application Default Credentials fromgcloud
, and obtaining OAuth tokens from local metadata server when running inside GCP are now supported. - #701
Refining Errors
We started working on improving error ergonomics. See the tracking issue #688 for more details.
The following is the summary of changes to kube::Error
included in this release:
- Added
Error::Auth(kube::client::AuthError)
(errors related to client auth, some of them were previously inError::Kubeconfig
) - Added
Error::BuildRequest(kube::core::request::Error)
(errors building request fromkube::core
) - Added
Error::InferConfig(kube::config::InferConfigError)
(forClient::try_default
) - Added
Error::OpensslTls(kube::client::OpensslTlsError)
(newopenssl-tls
feature) - #700 - Added
Error::UpgradeConnection(kube::client::UpgradeConnectinError)
(ws
feature, errors from upgrading a connection) - Removed
Error::Connection
(was unused) - Removed
Error::RequestBuild
(was unused) - Removed
Error::RequestSend
(was unused) - Removed
Error::RequestParse
(was unused) - Removed
Error::InvalidUri
(replaced by variants of errors inkube::config
errors) - Removed
Error::RequestValidation
(replaced by a variant ofError::BuildRequest
) - Removed
Error::Kubeconfig
(replaced byError::InferConfig
, andError::Auth
) - Removed
Error::ProtocolSwitch
(ws
only, replaced byError::UpgradeConnection
) - Removed
Error::MissingUpgradeWebSocketHeader
(ws
only, replaced byError::UpgradeConnection
) - Removed
Error::MissingConnectionUpgradeHeader
(ws
only, replaced byError::UpgradeConnection
) - Removed
Error::SecWebSocketAcceptKeyMismatch
(ws
only, replaced byError::UpgradeConnection
) - Removed
Error::SecWebSocketProtocolMismatch
(ws
only, replaced byError::UpgradeConnection
) - Removed
impl From<T> for Error
Expand for more details
The following breaking changes were made as a part of an effort to refine errors (the list is large, but most of them are lower level, and shouldn't require much change in most cases):
- Removed
impl From<E> for kube::Error
- #686 - Removed unused error variants in
kube::Error
:Connection
,RequestBuild
,RequestSend
,RequestParse
- #689 - Removed unused error variant
kube::error::ConfigError::LoadConfigFile
- #689 - Changed
kube::Error::RequestValidation(String)
tokube::Error::BuildRequest(kube::core::request::Error)
. Includes possible errors from building an HTTP request, and contains some errors fromkube::core
that was previously grouped underkube::Error::SerdeError
andkube::Error::HttpError
.kube::core::request::Error
is described below. - #686 - Removed
kube::core::Error
andkube::core::Result
.kube::core::Error
was replaced by more specific errors. - #686- Replaced
kube::core::Error::InvalidGroupVersion
withkube::core::gvk::ParseGroupVersionError
- Changed the error returned from
kube::core::admission::AdmissionRequest::with_patch
tokube::core::admission::SerializePatchError
(waskube::core::Error::SerdeError
) - Changed the error associated with
TryInto<AdmissionRequest<T>>
tokube::core::admission::ConvertAdmissionReviewError
(waskube::core::Error::RequestValidation
) - Changed the error returned from methods of
kube::core::Request
tokube::core::request::Error
(waskube::core::Error
).kube::core::request::Error
represents possible errors when building an HTTP request. The removedkube::core::Error
hadRequestValidation(String)
,SerdeError(serde_json::Error)
, andHttpError(http::Error)
variants. They are nowValidation(String)
,SerializeBody(serde_json::Error)
, andBuildRequest(http::Error)
respectively inkube::core::request::Error
.
- Replaced
- Changed variants of error enums in
kube::runtime
to tuples. Replacedsnafu
withthiserror
. - #686 - Removed
kube::error::ConfigError
andkube::Error::Kubeconfig(ConfigError)
- #696- Error variants related to client auth were moved to a new error
kube::client::AuthError
as described below - Remaining variants were split into
kube::config::{InferConfigError, InClusterError, KubeconfigError}
as described below
- Error variants related to client auth were moved to a new error
- Added
kube::client::AuthError
by extracting error variants related to client auth fromkube::ConfigError
and adding more variants to preserve context - #696 - Moved
kube::error::OAuthError
tokube::client::OAuthError
- #696 - Changed all errors in
kube::client::auth
tokube::client::AuthError
- #696 - Added
kube::Error::Auth(kube::client::AuthError)
- #696 - Added
kube::config::InferConfigError
which is an error fromConfig::infer()
andkube::Error::InferConfig(kube::config::InferConfigError)
- #696 - Added
kube::config::InClusterError
for errors related to loading in-cluster configuration by splittingkube::ConfigError
and adding more variants to preserve context. - #696 - Added
kube::config::KubeconfigError
for errors related to loading kubeconfig by splittingkube::ConfigError
and adding more variants to preserve context. - #696 - Changed methods of
kube::Config
to return these erorrs instead ofkube::Error
- #696 - Removed
kube::Error::InvalidUri
which was replaced by error variants preserving context, such asKubeconfigError::ParseProxyUrl
- #696 - Moved all errors from upgrading to a WebSocket connection into
kube::Error::UpgradeConnection(kube::client::UpgradeConnectionError)
- #696