diff --git a/packages/shulker-operator/src/lease.rs b/packages/shulker-operator/src/lease.rs index 25033703..8a56b0bb 100644 --- a/packages/shulker-operator/src/lease.rs +++ b/packages/shulker-operator/src/lease.rs @@ -128,7 +128,7 @@ impl LeaseLock { } } - return Err(anyhow!("failed to acquire lease")); + return Err(anyhow::anyhow!("failed to acquire lease")); }; self.current_resource_version = lease.metadata.resource_version.clone(); diff --git a/packages/shulker-operator/src/lib.rs b/packages/shulker-operator/src/lib.rs index 460a5b55..311f0e71 100644 --- a/packages/shulker-operator/src/lib.rs +++ b/packages/shulker-operator/src/lib.rs @@ -1,9 +1,3 @@ -#[macro_use] -extern crate anyhow; - -#[macro_use] -extern crate lazy_static; - pub mod api; pub mod lease; pub mod reconcilers; diff --git a/packages/shulker-operator/src/reconcilers/minecraft_cluster/fixtures.rs b/packages/shulker-operator/src/reconcilers/minecraft_cluster/fixtures.rs index 432224a4..ec9f1e49 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_cluster/fixtures.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_cluster/fixtures.rs @@ -1,6 +1,7 @@ use http::{Request, Response}; use hyper::Body; use kube::{core::ObjectMeta, Client}; +use lazy_static::lazy_static; use shulker_crds::v1alpha1::minecraft_cluster::{MinecraftCluster, MinecraftClusterSpec}; lazy_static! { diff --git a/packages/shulker-operator/src/reconcilers/minecraft_cluster/redis_stateful_set.rs b/packages/shulker-operator/src/reconcilers/minecraft_cluster/redis_stateful_set.rs index 9f5308e3..14ae0c4f 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_cluster/redis_stateful_set.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_cluster/redis_stateful_set.rs @@ -19,6 +19,7 @@ use kube::core::ObjectMeta; use kube::Api; use kube::Client; use kube::ResourceExt; +use lazy_static::lazy_static; use shulker_crds::v1alpha1::minecraft_cluster::MinecraftClusterRedisDeploymentType; use super::redis_service::RedisServiceBuilder; diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server/fixtures.rs b/packages/shulker-operator/src/reconcilers/minecraft_server/fixtures.rs index e01f81b8..2f2a7631 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server/fixtures.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_server/fixtures.rs @@ -4,6 +4,7 @@ use http::{Request, Response}; use hyper::Body; use k8s_openapi::api::core::v1::EnvVar; use kube::{core::ObjectMeta, Client}; +use lazy_static::lazy_static; use shulker_crds::{ resourceref::ResourceRefSpec, v1alpha1::{ diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs b/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs index a7a8213f..cb1dfba9 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs @@ -17,6 +17,7 @@ use k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta; use kube::Api; use kube::Client; use kube::ResourceExt; +use lazy_static::lazy_static; use shulker_crds::v1alpha1::minecraft_cluster::MinecraftCluster; use shulker_crds::v1alpha1::minecraft_server::MinecraftServerVersion; diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/fixtures.rs b/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/fixtures.rs index c6378678..b5bfd905 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/fixtures.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/fixtures.rs @@ -7,6 +7,7 @@ use http::{Request, Response}; use hyper::Body; use k8s_openapi::{api::core::v1::EnvVar, apimachinery::pkg::util::intstr::IntOrString}; use kube::{core::ObjectMeta, Client}; +use lazy_static::lazy_static; use shulker_crds::{ resourceref::ResourceRefSpec, schemas::{FleetAutoscalingSpec, TemplateSpec}, diff --git a/packages/shulker-operator/src/reconcilers/proxy_fleet/fixtures.rs b/packages/shulker-operator/src/reconcilers/proxy_fleet/fixtures.rs index 5163a4b4..a68875f8 100644 --- a/packages/shulker-operator/src/reconcilers/proxy_fleet/fixtures.rs +++ b/packages/shulker-operator/src/reconcilers/proxy_fleet/fixtures.rs @@ -7,6 +7,7 @@ use http::{Request, Response}; use hyper::Body; use k8s_openapi::{api::core::v1::EnvVar, apimachinery::pkg::util::intstr::IntOrString}; use kube::{core::ObjectMeta, Client}; +use lazy_static::lazy_static; use shulker_crds::{ resourceref::ResourceRefSpec, schemas::{FleetAutoscalingSpec, TemplateSpec}, diff --git a/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs b/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs index 43c67952..a0dd0ac0 100644 --- a/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs +++ b/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs @@ -25,6 +25,7 @@ use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString; use kube::Api; use kube::Client; use kube::ResourceExt; +use lazy_static::lazy_static; use shulker_crds::v1alpha1::minecraft_cluster::MinecraftCluster; use shulker_crds::v1alpha1::proxy_fleet::ProxyFleetTemplateVersion;