pub enum Error {
Show 27 variants
ConnectionError(String),
ConfigurationError(String),
DeploymentError(String),
RollbackError(String),
ScalingError(String),
ServiceError(String),
SecretError(String),
NamespaceError(String),
ConfigMapError(String),
IngressError(String),
GatewayError(String),
ValidationError(String),
NetworkPolicyError(String),
JobError(String),
CronJobError(String),
PvcError(String),
HpaError(String),
ResourceNotFound {
kind: String,
name: String,
namespace: String,
},
ResourceAlreadyExists {
kind: String,
name: String,
namespace: String,
},
Timeout {
resource: String,
timeout_secs: u64,
details: String,
},
PodFailed {
pod_name: String,
reason: String,
},
ContainerCrashed {
pod: String,
container: String,
exit_code: i32,
restarts: i32,
},
ImagePullError {
image: String,
reason: String,
},
InvalidSpec(String),
SerializationError(String),
KubeError(Error),
Internal(String),
}Expand description
Main error type for all Kubernetes operations.
Variants§
ConnectionError(String)
Error connecting to the Kubernetes cluster.
ConfigurationError(String)
Error with Kubernetes configuration (kubeconfig, credentials, etc.).
DeploymentError(String)
Error during deployment operations.
RollbackError(String)
Error during rollback operations.
ScalingError(String)
Error during scaling operations.
ServiceError(String)
Error during service operations.
SecretError(String)
Error during secret operations.
NamespaceError(String)
Error during namespace operations.
ConfigMapError(String)
Error during ConfigMap operations.
IngressError(String)
Error during Ingress operations.
GatewayError(String)
Error during Gateway operations.
ValidationError(String)
Validation error for resource specs.
NetworkPolicyError(String)
Error during NetworkPolicy operations.
JobError(String)
Error during Job operations.
CronJobError(String)
Error during CronJob operations.
PvcError(String)
Error during PersistentVolumeClaim operations.
HpaError(String)
Error during HorizontalPodAutoscaler operations.
ResourceNotFound
Resource not found in the cluster.
Fields
ResourceAlreadyExists
Resource already exists.
Fields
Timeout
Timeout waiting for a resource to be ready.
Fields
PodFailed
Pod failed with an error.
ContainerCrashed
Container crashed.
Fields
ImagePullError
Image pull error.
InvalidSpec(String)
Invalid resource specification.
SerializationError(String)
Serialization/deserialization error.
KubeError(Error)
Underlying Kubernetes API error.
Internal(String)
Generic internal error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn connection<S: Into<String>>(msg: S) -> Self
pub fn connection<S: Into<String>>(msg: S) -> Self
Create a connection error.
Sourcepub fn deployment<S: Into<String>>(msg: S) -> Self
pub fn deployment<S: Into<String>>(msg: S) -> Self
Create a deployment error.
Sourcepub fn validation<S: Into<String>>(msg: S) -> Self
pub fn validation<S: Into<String>>(msg: S) -> Self
Create a validation error.
Sourcepub fn network_policy<S: Into<String>>(msg: S) -> Self
pub fn network_policy<S: Into<String>>(msg: S) -> Self
Create a NetworkPolicy error.
Sourcepub fn not_found<S: Into<String>>(kind: S, name: S, namespace: S) -> Self
pub fn not_found<S: Into<String>>(kind: S, name: S, namespace: S) -> Self
Create a resource not found error.
Sourcepub fn already_exists<S: Into<String>>(kind: S, name: S, namespace: S) -> Self
pub fn already_exists<S: Into<String>>(kind: S, name: S, namespace: S) -> Self
Create a resource already exists error.
Sourcepub fn timeout<S: Into<String>>(
resource: S,
timeout_secs: u64,
details: S,
) -> Self
pub fn timeout<S: Into<String>>( resource: S, timeout_secs: u64, details: S, ) -> Self
Create a timeout error.
Sourcepub fn pod_failed<S: Into<String>>(pod_name: S, reason: S) -> Self
pub fn pod_failed<S: Into<String>>(pod_name: S, reason: S) -> Self
Create a pod failed error.
Sourcepub fn container_crashed<S: Into<String>>(
pod: S,
container: S,
exit_code: i32,
restarts: i32,
) -> Self
pub fn container_crashed<S: Into<String>>( pod: S, container: S, exit_code: i32, restarts: i32, ) -> Self
Create a container crashed error.
Sourcepub fn image_pull<S1: Into<String>, S2: Into<String>>(
image: S1,
reason: S2,
) -> Self
pub fn image_pull<S1: Into<String>, S2: Into<String>>( image: S1, reason: S2, ) -> Self
Create an image pull error.
Sourcepub fn invalid_spec<S: Into<String>>(msg: S) -> Self
pub fn invalid_spec<S: Into<String>>(msg: S) -> Self
Create an invalid spec error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more